lib/preserves/src/packed/root.zig

daab053ee43316e1809a84551d573ddd1e5bf3d2

 1 //! A binary encoding of values: a writer that turns a value into bytes, and a reader that turns
 2 //! bytes back into one value under limits the caller sets.
 3 //!
 4 //! A caller that stores, sends or hashes values needs every equal value to encode to the same
 5 //! bytes, and needs to decode bytes from an untrusted peer within bounds on memory and recursion.
 6 //! For values free of embedded values, discards, captures, binds and rest patterns, writing then
 7 //! reading returns an equal value, and writing the result again returns the same bytes.
 8 //!
 9 //! The encoding is the binary syntax of the [Preserves](https://preserves.dev/) data language,
10 //! which the package keeps. The writer is `encode` and the reader is `decode`, and the namespace
11 //! also holds their files and the tag bytes (`Tag`).
12 pub const constants = @import("constants.zig");
13 pub const reader = @import("reader.zig");
14 pub const writer = @import("writer.zig");
15 
16 pub const Tag = constants.Tag;
17 pub const decode = reader.decode;
18 pub const encode = writer.encode;