mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 08:38:14 +01:00
Decode std/flate fixed Huffman tables.
This commit is contained in:
1 parent
cbcf1b6025
commit
bfbcae4365
9 files changed
+240
-114
No files matched your search
+30
-13
@@ -75,6 +75,11 @@ golden_test flate_romeo_gt = {
|
||||
.src_offset1 = 550, //
|
||||
};
|
||||
|
||||
golden_test flate_romeo_fixed_gt = {
|
||||
.want_filename = "../../testdata/romeo.txt", //
|
||||
.src_filename = "../../testdata/romeo.txt.fixed-huff.flate", //
|
||||
};
|
||||
|
||||
golden_test gzip_midsummer_gt = {
|
||||
.want_filename = "../../testdata/midsummer.txt", //
|
||||
.src_filename = "../../testdata/midsummer.txt.gz", //
|
||||
@@ -131,6 +136,11 @@ void test_puffs_flate_decode_romeo() {
|
||||
test_buf1_buf1(puffs_flate_decode, &flate_romeo_gt);
|
||||
}
|
||||
|
||||
void test_puffs_flate_decode_romeo_fixed() {
|
||||
proc_funcname = __func__;
|
||||
test_buf1_buf1(puffs_flate_decode, &flate_romeo_fixed_gt);
|
||||
}
|
||||
|
||||
void test_puffs_flate_decode_split_src() {
|
||||
proc_funcname = __func__;
|
||||
|
||||
@@ -223,6 +233,11 @@ void test_mimic_flate_decode_romeo() {
|
||||
test_buf1_buf1(mimic_flate_decode, &flate_romeo_gt);
|
||||
}
|
||||
|
||||
void test_mimic_flate_decode_romeo_fixed() {
|
||||
proc_funcname = __func__;
|
||||
test_buf1_buf1(mimic_flate_decode, &flate_romeo_fixed_gt);
|
||||
}
|
||||
|
||||
void test_mimic_gzip_decode_midsummer() {
|
||||
proc_funcname = __func__;
|
||||
test_buf1_buf1(mimic_gzip_decode, &gzip_midsummer_gt);
|
||||
@@ -328,25 +343,27 @@ void bench_mimic_zlib_decode_100k() {
|
||||
// The empty comments forces clang-format to place one element per line.
|
||||
proc tests[] = {
|
||||
// Flate Tests
|
||||
test_puffs_flate_decode_256_bytes, //
|
||||
test_puffs_flate_decode_256_bytes, //
|
||||
/* TODO: implement puffs_flate, then uncomment these.
|
||||
test_puffs_flate_decode_midsummer, //
|
||||
test_puffs_flate_decode_pi, //
|
||||
test_puffs_flate_decode_midsummer, //
|
||||
test_puffs_flate_decode_pi, //
|
||||
*/
|
||||
test_puffs_flate_decode_romeo, //
|
||||
test_puffs_flate_decode_split_src, //
|
||||
test_puffs_flate_decode_romeo, //
|
||||
test_puffs_flate_decode_romeo_fixed, //
|
||||
test_puffs_flate_decode_split_src, //
|
||||
|
||||
#ifdef PUFFS_MIMIC
|
||||
|
||||
// Mimic Tests
|
||||
test_mimic_flate_decode_256_bytes, //
|
||||
test_mimic_flate_decode_midsummer, //
|
||||
test_mimic_flate_decode_pi, //
|
||||
test_mimic_flate_decode_romeo, //
|
||||
test_mimic_gzip_decode_midsummer, //
|
||||
test_mimic_gzip_decode_pi, //
|
||||
test_mimic_zlib_decode_midsummer, //
|
||||
test_mimic_zlib_decode_pi, //
|
||||
test_mimic_flate_decode_256_bytes, //
|
||||
test_mimic_flate_decode_midsummer, //
|
||||
test_mimic_flate_decode_pi, //
|
||||
test_mimic_flate_decode_romeo, //
|
||||
test_mimic_flate_decode_romeo_fixed, //
|
||||
test_mimic_gzip_decode_midsummer, //
|
||||
test_mimic_gzip_decode_pi, //
|
||||
test_mimic_zlib_decode_midsummer, //
|
||||
test_mimic_zlib_decode_pi, //
|
||||
|
||||
#endif // PUFFS_MIMIC
|
||||
|
||||
|
||||
Reference in new issue
Block a user