fixed versionsTest
This commit is contained in:
parent
1c69baa1a9
commit
9097f7b156
@ -155,7 +155,6 @@ unsigned long long FIOv01_decompressFrame(FILE* foutput, FILE* finput)
|
||||
BYTE* const oend = outBuff + outBuffSize;
|
||||
U64 filesize = 0;
|
||||
size_t toRead;
|
||||
size_t sizeCheck;
|
||||
ZSTDv01_Dctx* dctx = ZSTDv01_createDCtx();
|
||||
|
||||
|
||||
@ -164,8 +163,8 @@ unsigned long long FIOv01_decompressFrame(FILE* foutput, FILE* finput)
|
||||
|
||||
/* restore header, already read from input */
|
||||
MEM_writeLE32(inBuff, ZSTDv01_magicNumberLE);
|
||||
sizeCheck = ZSTDv01_decompressContinue(dctx, NULL, 0, inBuff, sizeof(ZSTDv01_magicNumberLE)); /* Decode frame header */
|
||||
if (ZSTDv01_isError(sizeCheck)) EXM_THROW(42, "Error decoding legacy header");
|
||||
{ size_t const sizeCheck = ZSTDv01_decompressContinue(dctx, NULL, 0, inBuff, sizeof(ZSTDv01_magicNumberLE)); /* Decode frame header */
|
||||
if (ZSTDv01_isError(sizeCheck)) EXM_THROW(42, "Error decoding legacy header"); }
|
||||
|
||||
/* Main decompression Loop */
|
||||
toRead = ZSTDv01_nextSrcSizeToDecompress(dctx);
|
||||
@ -185,8 +184,8 @@ unsigned long long FIOv01_decompressFrame(FILE* foutput, FILE* finput)
|
||||
|
||||
if (decodedSize) { /* not a header */
|
||||
/* Write block */
|
||||
sizeCheck = fwrite(op, 1, decodedSize, foutput);
|
||||
if (sizeCheck != decodedSize) EXM_THROW(46, "Write error : unable to write data block to destination file");
|
||||
{ size_t const sizeCheck = fwrite(op, 1, decodedSize, foutput);
|
||||
if (sizeCheck != decodedSize) EXM_THROW(46, "Write error : unable to write data block to destination file"); }
|
||||
filesize += decodedSize;
|
||||
op += decodedSize;
|
||||
if (op==oend) op = outBuff;
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Test zstd interoperability between versions"""
|
||||
# Based on LZ4 version test script, by Takayuki Matsuoka
|
||||
# Copyright Yann Collet, Przemyslaw Skibinski and Takayuki Matsuoka
|
||||
# License GPLv2
|
||||
|
||||
import filecmp
|
||||
import glob
|
||||
@ -152,6 +153,7 @@ def decompress_zst(tag):
|
||||
print('OK ')
|
||||
else:
|
||||
print('command does not work')
|
||||
dec_error = 1
|
||||
return dec_error
|
||||
|
||||
|
||||
@ -261,6 +263,6 @@ if __name__ == '__main__':
|
||||
print(zstd + ' : ' + repr(os.path.getsize(zstd)) + ', ' + sha1_of_file(zstd))
|
||||
|
||||
if error_code != 0:
|
||||
print('==== ERROR !!! =====')
|
||||
print('====== ERROR !!! =======')
|
||||
|
||||
sys.exit(error_code)
|
||||
|
Loading…
Reference in New Issue
Block a user