File: support-zstd-automatic-decompression.patch

package info (click to toggle)
lv 4.51-10.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,992 kB
  • sloc: ansic: 9,055; sh: 1,380; perl: 485; makefile: 254; csh: 4
file content (26 lines) | stat: -rw-r--r-- 805 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Description: support zstd automatic decompression
Author: YAMADA Tsuyoshi <tyamada@minimum2scp.org>
Last-Update: 2019-06-13
Bug-Debian: https://bugs.debian.org/930478

Index: lv/src/stream.c
===================================================================
--- lv.orig/src/stream.c
+++ lv/src/stream.c
@@ -45,6 +45,7 @@ private byte *gz_filter = "zcat";
 private byte *bz2_filter = "bzcat";
 private byte *lzma_filter = "lzcat";
 private byte *xz_filter = "xzcat";
+private byte *zstd_filter = "zstdcat";
 
 private stream_t *StreamAlloc()
 {
@@ -81,6 +82,8 @@ public stream_t *StreamOpen( byte *file
       filter = lzma_filter;
     else if ( !strcmp( "xz", exts ) )
       filter = xz_filter;
+    else if ( !strcmp( "zst", exts ) )
+      filter = zstd_filter;
   }
   if( NULL != filter ){
     /*