Skip to content

Commit

Permalink
csc updated to 2016-10-13
Browse files Browse the repository at this point in the history
  • Loading branch information
inikep committed Oct 15, 2016
1 parent dd9c601 commit 26ed8ad
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
v1.5
- csc updated to 2016-01-11
- csc updated to 2016-10-13

v1.4
- zstd updated to v1.0.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ blosclz 2015-11-10
brieflz 1.1.0
brotli 0.5.2
crush 1.0
csc 2016-01-11
csc 2016-10-13
density 0.12.5 beta (WARNING: it contains bugs (shortened decompressed output))
fastlz 0.1
gipfeli 2016-07-13
Expand Down
4 changes: 2 additions & 2 deletions _lzbench/compressors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ int64_t lzbench_csc_compress(char *inbuf, size_t insize, char *outbuf, size_t ou
osss.buf = outbuf + CSC_PROP_SIZE;
osss.len = CSC_PROP_SIZE;

CSCEncHandle h = CSCEnc_Create(&p, (ISeqOutStream*)&osss);
CSCEncHandle h = CSCEnc_Create(&p, (ISeqOutStream*)&osss, NULL);
CSCEnc_Encode(h, (ISeqInStream*)&isss, NULL);
CSCEnc_Encode_Flush(h);
CSCEnc_Destroy(h);
Expand All @@ -194,7 +194,7 @@ int64_t lzbench_csc_decompress(char *inbuf, size_t insize, char *outbuf, size_t
osss.buf = outbuf;
osss.len = 0;

CSCDecHandle h = CSCDec_Create(&p, (ISeqInStream*)&isss);
CSCDecHandle h = CSCDec_Create(&p, (ISeqInStream*)&isss, NULL);
CSCDec_Decode(h, (ISeqOutStream*)&osss, NULL);
CSCDec_Destroy(h);

Expand Down
2 changes: 1 addition & 1 deletion _lzbench/lzbench.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ static const compressor_desc_t comp_desc[LZBENCH_COMPRESSOR_COUNT] =
{ "brotli22", "0.5.2", 0, 11, 22, 0, lzbench_brotli_compress, lzbench_brotli_decompress, NULL, NULL },
{ "brotli24", "0.5.2", 0, 11, 24, 0, lzbench_brotli_compress, lzbench_brotli_decompress, NULL, NULL },
{ "crush", "1.0", 0, 2, 0, 0, lzbench_crush_compress, lzbench_crush_decompress, NULL, NULL },
{ "csc", "2016-01-11", 1, 5, 0, 0, lzbench_csc_compress, lzbench_csc_decompress, NULL, NULL },
{ "csc", "2016-10-13", 1, 5, 0, 0, lzbench_csc_compress, lzbench_csc_decompress, NULL, NULL },
{ "density", "0.12.5 beta", 1, 3, 0, 0, lzbench_density_compress, lzbench_density_decompress, NULL, NULL }, // decompression error (shortened output)
{ "fastlz", "0.1", 1, 2, 0, 0, lzbench_fastlz_compress, lzbench_fastlz_decompress, NULL, NULL },
{ "gipfeli", "2016-07-13", 0, 0, 0, 0, lzbench_gipfeli_compress, lzbench_gipfeli_decompress, NULL, NULL },
Expand Down
8 changes: 6 additions & 2 deletions libcsc/csc_memio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,15 @@ int MemIO::ReadBlock(uint8_t *buffer, uint32_t &size, int rc1bc0)
}

DataBlock dummy;
dummy.next = *blist;
dummy.next = rc1bc0 ? bc_blocks_ : rc_blocks_;
DataBlock *p = &dummy;
while(p->next) p = p->next;
p->next = newblock;
*blist = dummy.next;
if (rc1bc0) {
bc_blocks_ = dummy.next;
} else {
rc_blocks_ = dummy.next;
}
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion libcsc/csc_mf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,17 @@ int MatchFinder::Init(uint8_t *wnd,
if (ht_bits_ && ht_width_) {
ht6_ = mfbuf_ + cpos;
cpos += ht_width_ * (1 << ht_bits_);
} else
} else {
ht6_ = NULL;
}

if (bt_bits_) {
bt_head_ = mfbuf_ + cpos;
cpos += (1 << (uint64_t)bt_bits_);
bt_nodes_ = mfbuf_ + cpos;
cpos += bt_size_ * 2;
} else {
bt_head_ = NULL;
}

return 0;
Expand Down

0 comments on commit 26ed8ad

Please sign in to comment.