File: zstd-support.diff

package info (click to toggle)
argus-clients 1%3A5.0.2%2Bgit20250321.41f65e2-2
  • links: PTS
  • area: main
  • in suites: sid, trixie
  • size: 45,848 kB
  • sloc: ansic: 175,393; perl: 4,405; sh: 4,064; makefile: 2,520; lex: 517; yacc: 433; python: 62
file content (33 lines) | stat: -rw-r--r-- 1,878 bytes parent folder | download
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
27
28
29
30
31
32
33
Description: add zstd support
 Allows argus files to use zstandard compression
Author: Michael Stone <mstone@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Last-Update: 2016-10-24

Index: argus-clients-5.0.2+git20250321.41f65e2/common/argus_util.c
===================================================================
--- argus-clients-5.0.2+git20250321.41f65e2.orig/common/argus_util.c	2025-04-20 12:04:19.285763594 -0400
+++ argus-clients-5.0.2+git20250321.41f65e2/common/argus_util.c	2025-04-20 12:04:19.285763594 -0400
@@ -30762,6 +30762,7 @@
                      if (((ptr[0] == 0x1F) && ((ptr[1] == 0x8B) || (ptr[1] == 0x9D))) ||
                          ((ptr[0] == 0xFD) &&  (ptr[1] == 0x37) && (ptr[2] == 0x7A) && (ptr[3] == 0x58) &&  (ptr[4] == 0x5A) && (ptr[5] == 0x00)) || 
                          ((ptr[0] == 0xFD) && ((ptr[1] == 0x37) || (ptr[2] == 0x7A))) ||
+                         ((ptr[0] == 0x28) && (ptr[1] == 0xB5) && (ptr[2] == 0x2F) && (ptr[3] == 0xFD)) ||
                          ((ptr[0] == 'B') && (ptr[1] == 'Z') && (ptr[2] == 'h'))) {
                         char cmd[256];
                         bzero(cmd, 256);
@@ -30778,6 +30779,9 @@
                         if ((ptr[0] == 0xFD) && (ptr[1] == 0x37) && (ptr[2] == 0x7A) && (ptr[3] == 0x58) &&  (ptr[4] == 0x5A) && (ptr[5] == 0x00))
                            strncpy(cmd, "xzcat \"", 8);
                         else
+                        if (ptr[0] == 0x28)
+                           strncpy(cmd, "zstd -dc \"", 10);
+                        else
                            strncpy(cmd, "zcat \"", 7);
             
                         strncat(cmd, input->filename, (256 - strlen(cmd)));