aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2022-07-15 16:11:26 +0200
committerYann Collet <cyan@fb.com>2022-07-15 19:30:53 +0200
commit6784e78e006329ba67eb799a1cb94dd7267a9241 (patch)
tree96330ac7e1f25829df98330cab8cc57eca44f35f /lib
parent0c620ce212d92d009f47293ea5e0b676c3380fbb (diff)
downloadlz4-6784e78e006329ba67eb799a1cb94dd7267a9241.tar.gz
support skippable frames within pipe
fix #977 fseek() doesn't work for pipe, switch to "read and forget" mode in such case.
Diffstat (limited to 'lib')
-rw-r--r--lib/lz4frame.c2
-rw-r--r--lib/lz4frame.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/lz4frame.c b/lib/lz4frame.c
index 5373083c..0516f1ff 100644
--- a/lib/lz4frame.c
+++ b/lib/lz4frame.c
@@ -206,8 +206,6 @@ static void LZ4F_writeLE64 (void* dst, U64 value64)
#define _4BITS 0x0F
#define _8BITS 0xFF
-#define LZ4F_MAGIC_SKIPPABLE_START 0x184D2A50U
-#define LZ4F_MAGICNUMBER 0x184D2204U
#define LZ4F_BLOCKUNCOMPRESSED_FLAG 0x80000000U
#define LZ4F_BLOCKSIZEID_DEFAULT LZ4F_max64KB
diff --git a/lib/lz4frame.h b/lib/lz4frame.h
index 1de09d8e..7ebbfeca 100644
--- a/lib/lz4frame.h
+++ b/lib/lz4frame.h
@@ -376,6 +376,8 @@ LZ4FLIB_API LZ4F_errorCode_t LZ4F_freeDecompressionContext(LZ4F_dctx* dctx);
* Streaming decompression functions
*************************************/
+#define LZ4F_MAGICNUMBER 0x184D2204U
+#define LZ4F_MAGIC_SKIPPABLE_START 0x184D2A50U
#define LZ4F_MIN_SIZE_TO_KNOW_HEADER_LENGTH 5
/*! LZ4F_headerSize() : v1.9.0+