Commit b5d565cc authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

[t:4635] make TOKU_DEFAULT_COMPRESSION_METHOD a separate value


git-svn-id: file:///svn/toku/tokudb@41633 c7de825b-a66e-492c-adef-691d508d4ae1
parent 85b70d67
...@@ -564,9 +564,9 @@ int main (int argc, char *const argv[] __attribute__((__unused__))) { ...@@ -564,9 +564,9 @@ 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_FAST_COMPRESSION_METHOD = 1,\n"); // friendlier names printf(" TOKU_DEFAULT_COMPRESSION_METHOD = 1,\n"); // default is actually quicklz
printf(" TOKU_SMALL_COMPRESSION_METHOD = 2,\n"); printf(" TOKU_FAST_COMPRESSION_METHOD = 2,\n"); // friendlier names
printf(" TOKU_DEFAULT_COMPRESSION_METHOD = TOKU_FAST_COMPRESSION_METHOD,\n"); // default is quicklz printf(" TOKU_SMALL_COMPRESSION_METHOD = 3,\n");
printf("} TOKU_COMPRESSION_METHOD;\n"); printf("} TOKU_COMPRESSION_METHOD;\n");
//bulk loader //bulk loader
......
...@@ -48,9 +48,9 @@ typedef enum toku_compression_method { ...@@ -48,9 +48,9 @@ typedef enum toku_compression_method {
TOKU_ZLIB_METHOD = 8, TOKU_ZLIB_METHOD = 8,
TOKU_QUICKLZ_METHOD = 9, TOKU_QUICKLZ_METHOD = 9,
TOKU_LZMA_METHOD = 10, TOKU_LZMA_METHOD = 10,
TOKU_FAST_COMPRESSION_METHOD = 1, TOKU_DEFAULT_COMPRESSION_METHOD = 1,
TOKU_SMALL_COMPRESSION_METHOD = 2, TOKU_FAST_COMPRESSION_METHOD = 2,
TOKU_DEFAULT_COMPRESSION_METHOD = TOKU_FAST_COMPRESSION_METHOD, TOKU_SMALL_COMPRESSION_METHOD = 3,
} TOKU_COMPRESSION_METHOD; } TOKU_COMPRESSION_METHOD;
typedef struct __toku_loader DB_LOADER; typedef struct __toku_loader DB_LOADER;
struct __toku_loader_internal; struct __toku_loader_internal;
......
...@@ -15,6 +15,7 @@ normalize_compression_method(enum toku_compression_method method) ...@@ -15,6 +15,7 @@ normalize_compression_method(enum toku_compression_method method)
// Effect: resolve "friendly" names like "fast" and "small" into their real values. // Effect: resolve "friendly" names like "fast" and "small" into their real values.
{ {
switch (method) { switch (method) {
case TOKU_DEFAULT_COMPRESSION_METHOD:
case TOKU_FAST_COMPRESSION_METHOD: case TOKU_FAST_COMPRESSION_METHOD:
return TOKU_QUICKLZ_METHOD; return TOKU_QUICKLZ_METHOD;
case TOKU_SMALL_COMPRESSION_METHOD: case TOKU_SMALL_COMPRESSION_METHOD:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment