Crate binary_rw

Source
Expand description

Library for reading and writing binary data.

If the wasm32 feature is enabled then length prefixed strings use a u32 for the length so that the encoded data is portable across platforms.

Otherwise string length is encoded using usize which may vary across platforms.

wasm32 will also change read_usize to read a 32bit integer

If you only want the u32 strings please use string_len_u32 feature

Structs§

BinaryReader
Read from a stream.
BinaryWriter
Write to a stream.
FileStream
Stream that wraps a file.
MemoryStream
Stream that wraps an owned buffer.
SliceStream
Stream that wraps a slice of bytes.

Enums§

BinaryError
Error generated reading and writing binary data.
Endian
Variants to describe endianness.

Traits§

Decode
Trait for decoding from binary.
Encode
Trait for encoding to binary.
ReadStream
Trait for a readable stream.
SeekStream
Trait for streams that can seek.
WriteStream
Trait for a writable stream.

Type Aliases§

Result
Result type for binary errors.