Add a skeleton of an Adler checksummer.

This commit is contained in:
Nigel Tao committed 2017-10-19 18:09:14 +11:00
1 parent 4b07d3cde6
commit 5b0d6f6f3e
4 files changed
+108 -9

No files matched your search

+18
View File
@@ -234,6 +234,23 @@ typedef struct {
} private_impl;
} puffs_flate_decoder;
typedef struct {
// Do not access the private_impl's fields directly. There is no API/ABI
// compatibility or safety guarantee if you do so. Instead, use the
// puffs_flate_adler_etc functions.
//
// In C++, these fields would be "private", but C does not support that.
//
// It is a struct, not a struct*, so that it can be stack allocated.
struct {
puffs_flate_status status;
uint32_t magic;
uint32_t f_state;
} private_impl;
} puffs_flate_adler;
typedef struct {
// Do not access the private_impl's fields directly. There is no API/ABI
// compatibility or safety guarantee if you do so. Instead, use the
@@ -247,6 +264,7 @@ typedef struct {
uint32_t magic;
puffs_flate_decoder f_dec;
puffs_flate_adler f_adler;
struct {
uint32_t coro_susp_point;