diff options
author | Takayuki MATSUOKA <takayuki.matsuoka@gmail.com> | 2015-04-14 17:20:47 (GMT) |
---|---|---|
committer | Takayuki MATSUOKA <takayuki.matsuoka@gmail.com> | 2015-04-14 21:45:24 (GMT) |
commit | 081bcca33bba4f6ac3e913b3cf2bc2ba58b6b697 (patch) | |
tree | 2babff75a9522491e50d1f973bbf0cc0c2f0c125 /lib/lz4frame.h | |
parent | 985158304442c843208d446e12a3000dcc077e8a (diff) | |
download | lz4-081bcca33bba4f6ac3e913b3cf2bc2ba58b6b697.zip lz4-081bcca33bba4f6ac3e913b3cf2bc2ba58b6b697.tar.gz lz4-081bcca33bba4f6ac3e913b3cf2bc2ba58b6b697.tar.bz2 |
Issue#90 : Add LZ4F_ prefix
- Add LZ4F_ prefix to LZ4 frame related enums.
- Also add conditional macro LZ4F_DISABLE_OLD_ENUMS for testing and users who prefer strict prefixes.
Diffstat (limited to 'lib/lz4frame.h')
-rw-r--r-- | lib/lz4frame.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/lz4frame.h b/lib/lz4frame.h index f22ef00..1f13a07 100644 --- a/lib/lz4frame.h +++ b/lib/lz4frame.h @@ -62,16 +62,23 @@ const char* LZ4F_getErrorName(LZ4F_errorCode_t code); /* return error code str /************************************** * Frame compression types * ************************************/ -typedef enum { LZ4F_default=0, max64KB=4, max256KB=5, max1MB=6, max4MB=7 } blockSizeID_t; +typedef enum { LZ4F_default=0, LZ4F_max64KB=4, LZ4F_max256KB=5, LZ4F_max1MB=6, LZ4F_max4MB=7 } LZ4F_blockSizeID_t; +typedef enum { LZ4F_blockLinked=0, LZ4F_blockIndependent} LZ4F_blockMode_t; +typedef enum { LZ4F_noContentChecksum=0, LZ4F_contentChecksumEnabled } LZ4F_contentChecksum_t; +typedef enum { LZ4F_frame=0, LZ4F_skippableFrame } LZ4F_frameType_t; + +#ifndef LZ4F_DISABLE_OLD_ENUMS +typedef enum { /*LZ4F_default=0,*/ max64KB=4, max256KB=5, max1MB=6, max4MB=7 } blockSizeID_t; typedef enum { blockLinked=0, blockIndependent} blockMode_t; typedef enum { noContentChecksum=0, contentChecksumEnabled } contentChecksum_t; -typedef enum { LZ4F_frame=0, skippableFrame } frameType_t; +typedef enum { /*LZ4F_frame=0,*/ skippableFrame } frameType_t; +#endif typedef struct { - blockSizeID_t blockSizeID; /* max64KB, max256KB, max1MB, max4MB ; 0 == default */ - blockMode_t blockMode; /* blockLinked, blockIndependent ; 0 == default */ - contentChecksum_t contentChecksumFlag; /* noContentChecksum, contentChecksumEnabled ; 0 == default */ - frameType_t frameType; /* LZ4F_frame, skippableFrame ; 0 == default */ + LZ4F_blockSizeID_t blockSizeID; /* max64KB, max256KB, max1MB, max4MB ; 0 == default */ + LZ4F_blockMode_t blockMode; /* blockLinked, blockIndependent ; 0 == default */ + LZ4F_contentChecksum_t contentChecksumFlag; /* noContentChecksum, contentChecksumEnabled ; 0 == default */ + LZ4F_frameType_t frameType; /* LZ4F_frame, skippableFrame ; 0 == default */ unsigned long long contentSize; /* Size of uncompressed (original) content ; 0 == unknown */ unsigned reserved[2]; /* must be zero for forward compatibility */ } LZ4F_frameInfo_t; |