Add a zlib decoder to std/flate.

This commit is contained in:
Nigel Tao committed 2017-08-05 16:34:03 +10:00
1 parent 2e6b364dcc
commit b3710e583f
13 files changed
+566 -117

No files matched your search

+5
View File
@@ -8,6 +8,11 @@
// TODO: look for (ifdef) the x86 architecture and cast the pointer? Only do so
// if a benchmark justifies the additional code path.
#define PUFFS_U16BE(p) (((uint16_t)(p[0]) << 8) | ((uint16_t)(p[1]) << 0))
#define PUFFS_U16LE(p) (((uint16_t)(p[0]) << 0) | ((uint16_t)(p[1]) << 8))
#define PUFFS_U32BE(p) \
(((uint32_t)(p[0]) << 24) | ((uint32_t)(p[1]) << 16) | \
((uint32_t)(p[2]) << 8) | ((uint32_t)(p[3]) << 0))
#define PUFFS_U32LE(p) \
(((uint32_t)(p[0]) << 0) | ((uint32_t)(p[1]) << 8) | \
((uint32_t)(p[2]) << 16) | ((uint32_t)(p[3]) << 24))