@@ -580,6 +580,7 @@ int main (int argc, char *const argv[] __attribute__((__unused__))) {
...
@@ -580,6 +580,7 @@ int main (int argc, char *const argv[] __attribute__((__unused__))) {
printf(" TOKU_ZLIB_METHOD = 8,\n");// RFC 1950 says use 8 for zlib. It reserves 15 to allow more bytes.
printf(" TOKU_ZLIB_METHOD = 8,\n");// RFC 1950 says use 8 for zlib. It reserves 15 to allow more bytes.
printf(" TOKU_QUICKLZ_METHOD = 9,\n");// We use 9 for QUICKLZ (the QLZ compression level is stored int he high-order nibble). I couldn't find any standard for any other numbers, so I just use 9. -Bradley
printf(" TOKU_QUICKLZ_METHOD = 9,\n");// We use 9 for QUICKLZ (the QLZ compression level is stored int he high-order nibble). I couldn't find any standard for any other numbers, so I just use 9. -Bradley
printf(" TOKU_LZMA_METHOD = 10,\n");// We use 10 for LZMA. (Note the compression level is stored in the high-order nibble).
printf(" TOKU_LZMA_METHOD = 10,\n");// We use 10 for LZMA. (Note the compression level is stored in the high-order nibble).
printf(" TOKU_ZLIB_WITHOUT_CHECKSUM_METHOD = 11,\n");// We wrap a zlib without checksumming compression technique in our own checksummed metadata.
printf(" TOKU_DEFAULT_COMPRESSION_METHOD = 1,\n");// default is actually quicklz
printf(" TOKU_DEFAULT_COMPRESSION_METHOD = 1,\n");// default is actually quicklz
returnsize+400+1;// quicklz manual says 400 bytes is enough. We need one more byte for the rfc1950-style header byte. bits 0-3 are 9, bits 4-7 are the QLZ_COMPRESSION_LEVEL.
returnsize+400+1;// quicklz manual says 400 bytes is enough. We need one more byte for the rfc1950-style header byte. bits 0-3 are 9, bits 4-7 are the QLZ_COMPRESSION_LEVEL.
caseTOKU_ZLIB_METHOD:
caseTOKU_ZLIB_METHOD:
returncompressBound(size);
returncompressBound(size);
caseTOKU_ZLIB_WITHOUT_CHECKSUM_METHOD:
return2+deflateBound(nullptr,size);// We need one extra for the rfc1950-style header byte, and one extra to store windowBits (a bit over cautious about future upgrades maybe).