diff options
author | Nicholas <nbnoll@eml.cc> | 2021-11-20 10:53:19 -0800 |
---|---|---|
committer | Nicholas <nbnoll@eml.cc> | 2021-11-20 10:53:19 -0800 |
commit | a9bfe650038afea8b751175cac16f6027345e45f (patch) | |
tree | 9a7f9feb76a64bb3efe573036d80b7bdbf8a59a5 /include/base/flate.h | |
parent | 1c8d4e69205fd875f6bec3fa3bd929c2e7f52f62 (diff) |
Chore: reorganize libutf and libfmt into base
I found the split to be arbitrary. Better to include the functionality
in the standard library. I also split the headers to allow for more
granular inclusion (but the library is still monolithic). The only
ugliness is the circular dependency introduced with libutf's generated
functions. We put explicit prereqs with the necessary object files
instead.
Diffstat (limited to 'include/base/flate.h')
-rw-r--r-- | include/base/flate.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/base/flate.h b/include/base/flate.h new file mode 100644 index 0000000..670c8e7 --- /dev/null +++ b/include/base/flate.h @@ -0,0 +1,16 @@ +#pragma once + +// ----------------------------------------------------------------------------- +// libflate +// NOTE: Experimental! + +typedef struct flate·Reader flate·Reader; +typedef struct flate·Writer flate·Writer; + +flate·Reader *flate·openreader(io·Reader rdr, void* r, mem·Allocator mem, void* m); +int flate·read(flate·Reader *rdr, int sz, int n, void *buf); +int flate·closereader(flate·Reader *rdr); + +flate·Writer *flate·openwriter(io·Writer wtr, void* w, mem·Allocator mem, void* m); +int flate·write(flate·Writer *wtr, int sz, int n, void *buf); +int flate·closewriter(flate·Writer *wtr); |