From: Jonathan Dieter Date: Wed, 25 Jul 2018 21:03:03 +0000 (+0100) Subject: ABI change: Make manual chunking a compression option X-Git-Tag: archive/raspbian/1.1.9+ds1-1+rpi1~1^2~168 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=bde94ac0ceacb806f88f4fbae1f860983eb687f2;p=zchunk.git ABI change: Make manual chunking a compression option Signed-off-by: Jonathan Dieter --- diff --git a/include/zck.h.in b/include/zck.h.in index 9512aee..1a75fc2 100644 --- a/include/zck.h.in +++ b/include/zck.h.in @@ -25,8 +25,8 @@ typedef enum zck_ioption { ZCK_HASH_CHUNK_TYPE, /* Set chunk hash type using zck_hash */ ZCK_VAL_HEADER_HASH_TYPE, /* Set what the header hash type *should* be */ ZCK_VAL_HEADER_LENGTH, /* Set what the header length *should* be */ - ZCK_MANUAL_CHUNK, /* Disable auto-chunking */ ZCK_COMP_TYPE = 100, /* Set compression type using zck_comp */ + ZCK_MANUAL_CHUNK, /* Disable auto-chunking */ ZCK_ZSTD_COMP_LEVEL = 1000 /* Set zstd compression level */ } zck_ioption; diff --git a/src/lib/comp/comp.c b/src/lib/comp/comp.c index f053c5c..8f8bdf8 100644 --- a/src/lib/comp/comp.c +++ b/src/lib/comp/comp.c @@ -262,6 +262,18 @@ int comp_ioption(zckCtx *zck, zck_ioption option, ssize_t value) { } if(option == ZCK_COMP_TYPE) { return set_comp_type(zck, value); + + /* Manual chunking */ + } else if(option == ZCK_MANUAL_CHUNK) { + VALIDATE_WRITE_BOOL(zck); + if(value != 0) { + zck_log(ZCK_LOG_DEBUG, "Disabling automatic chunking"); + zck->manual_chunk = 1; + } else { + zck_log(ZCK_LOG_DEBUG, "Enabling automatic chunking"); + zck->manual_chunk = 0; + } + } else { if(zck && zck->comp.set_parameter) return zck->comp.set_parameter(zck, &(zck->comp), option, &value); diff --git a/src/lib/zck.c b/src/lib/zck.c index 12eb838..ff33bc6 100644 --- a/src/lib/zck.c +++ b/src/lib/zck.c @@ -270,15 +270,6 @@ int PUBLIC zck_set_ioption(zckCtx *zck, zck_ioption option, ssize_t value) { return False; } zck->prep_hdr_size = value; - } else if(option == ZCK_MANUAL_CHUNK) { - VALIDATE_WRITE_BOOL(zck); - if(value != 0) { - zck_log(ZCK_LOG_DEBUG, "Disabling automatic chunking"); - zck->manual_chunk = 1; - } else { - zck_log(ZCK_LOG_DEBUG, "Enabling automatic chunking"); - zck->manual_chunk = 0; - } /* Hash options */ } else if(option < 100) { diff --git a/test/compat_reports/zchunk/0.9.0_to_0.9.1/compat_report.html b/test/compat_reports/zchunk/0.9.0_to_0.9.1/compat_report.html deleted file mode 100644 index 9fe2866..0000000 --- a/test/compat_reports/zchunk/0.9.0_to_0.9.1/compat_report.html +++ /dev/null @@ -1,546 +0,0 @@ - - - - - - - - - -zchunk: 0.9.0 to 0.9.1 compatibility report - - - -

API compatibility report for the libzck.so object between 0.9.0 and 0.9.1 versions on x86_64

- -
-
-

Test Info


- - - - - - - -
Module Namezchunk
Version #10.9.0
Version #20.9.1
Archx86_64
GCC Version8.1.1
SubjectBinary Compatibility
-

Test Results


- - - - - - -
Total Header Files1
Total Objects1
Total Symbols / Types71 / 12
Compatibility99.3%
-

Problem Summary


- - - - - - - - - -
SeverityCount
Added Symbols-0
Removed SymbolsHigh0
Problems with
Data Types
High0
Medium0
Low0
Problems with
Symbols
High0
Medium1
Low1
Problems with
Constants
Low0
- - -

Problems with Symbols, Medium Severity  1 


-zck.h, libzck.so.0.9.0
- -[+] zck_get_error ( zckCtx* zck )  1  -
- -
-to the top
- -

Problems with Symbols, Low Severity  1 


-zck.h, libzck.so.0.9.0
- -[+] zck_get_error ( zckCtx* zck )  1  -
- -
-to the top
-

Header Files  1 


-
-zck.h
-
-
to the top
-

Objects  1 


-
-libzck.so.0.9.0
-
-
to the top
-


-

Test Info


- - - - - - -
Module Namezchunk
Version #10.9.0
Version #20.9.1
Archx86_64
SubjectSource Compatibility
-

Test Results


- - - - - - -
Total Header Files1
Total Objects1
Total Symbols / Types71 / 12
Compatibility99.3%
-

Problem Summary


- - - - - - - - - -
SeverityCount
Added Symbols-0
Removed SymbolsHigh0
Problems with
Data Types
High0
Medium0
Low0
Problems with
Symbols
High0
Medium1
Low0
Problems with
Constants
Low0
- - -

Problems with Symbols, Medium Severity  1 


-zck.h
- -[+] zck_get_error ( zckCtx* zck )  1  -
- -
-to the top
-

Header Files  1 


-
-zck.h
-
-
to the top
-

Objects  1 


-
-libzck.so.0.9.0
-
-
to the top
-



- -
- - diff --git a/test/compat_reports/zchunk/0.9.1_to_0.9.1/compat_report.html b/test/compat_reports/zchunk/0.9.1_to_0.9.1/compat_report.html new file mode 100644 index 0000000..256d526 --- /dev/null +++ b/test/compat_reports/zchunk/0.9.1_to_0.9.1/compat_report.html @@ -0,0 +1,529 @@ + + + + + + + + + +zchunk: 0.9.1 to 0.9.1 compatibility report + + + +

API compatibility report for the libzck.so object between 0.9.1 and 0.9.1 versions on x86_64

+ +
+
+

Test Info


+ + + + + + + +
Module Namezchunk
Version #10.9.1
Version #20.9.1
Archx86_64
GCC Version8.1.1
SubjectBinary Compatibility
+

Test Results


+ + + + + + +
Total Header Files1
Total Objects1
Total Symbols / Types71 / 12
Compatibility99.3%
+

Problem Summary


+ + + + + + + + + +
SeverityCount
Added Symbols-0
Removed SymbolsHigh0
Problems with
Data Types
High0
Medium1
Low0
Problems with
Symbols
High0
Medium0
Low0
Problems with
Constants
Low0
+ + +

Problems with Data Types, Medium Severity  1 


+zck.h
+ +[+] enum zck_ioption  1  +
+ + +
+to the top
+

Header Files  1 


+
+zck.h
+
+
to the top
+

Objects  1 


+
+libzck.so.0.9.1
+
+
to the top
+


+

Test Info


+ + + + + + +
Module Namezchunk
Version #10.9.1
Version #20.9.1
Archx86_64
SubjectSource Compatibility
+

Test Results


+ + + + + + +
Total Header Files1
Total Objects1
Total Symbols / Types71 / 12
Compatibility100%
+

Problem Summary


+ + + + + + + + + + +
SeverityCount
Added Symbols-0
Removed SymbolsHigh0
Problems with
Data Types
High0
Medium0
Low0
Problems with
Symbols
High0
Medium0
Low0
Problems with
Constants
Low0
Other Changes
in Data Types
-1
+ + +

Other Changes in Data Types  1 


+zck.h
+ +[+] enum zck_ioption  1  +
+ + +
+to the top
+

Header Files  1 


+
+zck.h
+
+
to the top
+

Objects  1 


+
+libzck.so.0.9.1
+
+
to the top
+



+ +
+ +