changed filed order
This commit is contained in:
@@ -472,32 +472,29 @@ size_t ZSTD_decodeLiteralsBlock(ZSTD_DCtx* dctx,
|
||||
if (srcSize < 5) return ERROR(corruption_detected); /* srcSize >= MIN_CBLOCK_SIZE == 3; here we need up to 5 for lhSize, + cSize (+nbSeq) */
|
||||
switch(lhlCode)
|
||||
{
|
||||
case 1:
|
||||
singleStream = 1;
|
||||
/* fall through */
|
||||
case 0: default: /* note : default is impossible, since lhlCode into [0..3] */
|
||||
case 0: case 1: default: /* note : default is impossible, since lhlCode into [0..3] */
|
||||
/* 2 - 2 - 10 - 10 */
|
||||
{ U32 const lhc = MEM_readLE24(istart) >> 4;
|
||||
{ U32 const lhc = MEM_readLE32(istart);
|
||||
singleStream = lhlCode;
|
||||
lhSize = 3;
|
||||
litSize = lhc & 0x3FF;
|
||||
litCSize = lhc >> 10;
|
||||
litSize = (lhc >> 4) & 0x3FF;
|
||||
litCSize = (lhc >> 14) & 0x3FF;
|
||||
break;
|
||||
}
|
||||
|
||||
case 2:
|
||||
/* 2 - 2 - 14 - 14 */
|
||||
{ U32 const lhc = MEM_readLE32(istart) >> 4;
|
||||
{ U32 const lhc = MEM_readLE32(istart);
|
||||
lhSize = 4;
|
||||
litSize = lhc & 0x3FFF;
|
||||
litCSize = lhc >> 14;
|
||||
litSize = (lhc >> 4) & 0x3FFF;
|
||||
litCSize = lhc >> 18;
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
/* 2 - 2 - 18 - 18 */
|
||||
{ U64 const lhc = (MEM_readLE32(istart) + (((U64)istart[4]) << 32)) >> 4;
|
||||
{ U32 const lhc = MEM_readLE32(istart);
|
||||
lhSize = 5;
|
||||
litSize = lhc & 0x3FFFF;
|
||||
litCSize = lhc >> 18;
|
||||
litSize = (lhc >> 4) & 0x3FFFF;
|
||||
litCSize = (lhc >> 22) + (istart[4] << 10);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(MOREFLAGS)
|
||||
|
||||
ZSTDCOMMON_FILES := $(ZSTDDIR)/common/*.c
|
||||
ZSTDCOMP_FILES := $(ZSTDDIR)/compress/zstd_compress.c $(ZSTDDIR)/compress/fse_compress.c $(ZSTDDIR)/compress/huf_compress.c
|
||||
ZSTDDECOMP_FILES := $(ZSTDDIR)/decompress/huf_decompress.c $(ZSTDDIR)/decompress/zstd_decompress.c
|
||||
ZSTDDECOMP_FILES := $(ZSTDDIR)/decompress/zstd_decompress.c $(ZSTDDIR)/decompress/huf_decompress.c
|
||||
ZSTD_FILES := $(ZSTDDECOMP_FILES) $(ZSTDCOMMON_FILES) $(ZSTDCOMP_FILES)
|
||||
ZBUFF_FILES := $(ZSTDDIR)/compress/zbuff_compress.c $(ZSTDDIR)/decompress/zbuff_decompress.c
|
||||
ZDICT_FILES := $(ZSTDDIR)/dictBuilder/*.c
|
||||
|
||||
Reference in New Issue
Block a user