(.require [library [lux (.except) ["$" documentation] [data [text (.only \n) ["%" \\format (.only format)]]] [macro ["[0]" template]]]] ["[0]" \\format] [\\library ["[0]" /]]) (.def \\format (.List $.Module) ($.module \\format._ "" [($.default \\format.monoid) ($.default \\format.bits_8) ($.default \\format.bits_16) ($.default \\format.bits_32) ($.default \\format.bits_64) ($.default \\format.any) ($.default \\format.bit) ($.default \\format.nat) ($.default \\format.int) ($.default \\format.rev) ($.default \\format.frac) ($.default \\format.binary_8) ($.default \\format.binary_16) ($.default \\format.binary_32) ($.default \\format.binary_64) ($.default \\format.utf8_8) ($.default \\format.utf8_16) ($.default \\format.utf8_32) ($.default \\format.utf8_64) ($.default \\format.text) ($.default \\format.sequence_8) ($.default \\format.sequence_16) ($.default \\format.sequence_32) ($.default \\format.sequence_64) ($.default \\format.maybe) ($.default \\format.list) ($.default \\format.set) ($.default \\format.symbol) ($.default \\format.type) ($.default \\format.location) ($.default \\format.code) ($.documentation \\format.Mutation "A mutation of binary data, tracking where in the data to transform.") ($.documentation \\format.Specification "A description of how to transform binary data.") ($.documentation \\format.no_op "A specification for empty binary data.") ($.documentation \\format.instance "Given a specification of how to construct binary data, yields a binary blob that matches it.") ($.documentation (\\format.Format it) "An operation that knows how to write information into a binary blob.") ($.documentation \\format.result "Yields a binary blob with all the information written to it." [(result format value)]) ($.documentation \\format.or "" [(or left right)]) ($.documentation \\format.and "" [(and pre post)]) ($.documentation \\format.rec "A combinator for recursive formats." [(rec body)]) ($.documentation \\format.segment "Writes at most 'size' bytes of an input binary blob." [(segment size)])] [])) (.def .public documentation (.List $.Module) ($.module /._ "" [($.default /.index_out_of_bounds) ($.default /.slice_out_of_bounds) ($.default /.size) ($.default /.equivalence) ($.default /.monoid) ($.documentation /.Binary "A binary BLOB of data.") ($.documentation /.empty "A fresh/empty binary BLOB of the specified size." [(empty size)]) ($.documentation /.mix "" [(mix f init binary)]) ($.documentation /.bits_8 "Read 1 byte (8 bits) at the given index." [(bits_8 index binary)]) ($.documentation /.bits_16 "Read 2 bytes (16 bits) at the given index." [(bits_16 index binary)]) ($.documentation /.bits_32 "Read 4 bytes (32 bits) at the given index." [(bits_32 index binary)]) ($.documentation /.bits_64 "Read 8 bytes (64 bits) at the given index." [(bits_64 index binary)]) ($.documentation /.has_8! "Write 1 byte (8 bits) at the given index." [(has_8! index value binary)]) ($.documentation /.has_16! "Write 2 bytes (16 bits) at the given index." [(has_16! index value binary)]) ($.documentation /.has_32! "Write 4 bytes (32 bits) at the given index." [(has_32! index value binary)]) ($.documentation /.has_64! "Write 8 bytes (64 bits) at the given index." [(has_64! index value binary)]) ($.documentation /.copy! "Mutates the target binary BLOB by copying bytes from the source BLOB to it." [(copy! bytes source_offset source target_offset target)]) ($.documentation /.slice "Yields a subset of the binary BLOB, so long as the specified range is valid." [(slice offset length binary)]) ($.documentation /.after "Yields a binary BLOB with at most the specified number of bytes removed." [(after bytes binary)])] [..\\format]))