9 unstable releases (4 breaking)

0.5.2 Oct 10, 2024
0.5.1 Feb 13, 2024
0.5.0 Jan 30, 2024
0.3.2 Dec 28, 2023
0.1.0 Aug 18, 2022

#196 in Rust patterns

Download history 20293/week @ 2024-08-22 22212/week @ 2024-08-29 17733/week @ 2024-09-05 17727/week @ 2024-09-12 13685/week @ 2024-09-19 19814/week @ 2024-09-26 20553/week @ 2024-10-03 22745/week @ 2024-10-10 19922/week @ 2024-10-17 21715/week @ 2024-10-24 22638/week @ 2024-10-31 21996/week @ 2024-11-07 21179/week @ 2024-11-14 20598/week @ 2024-11-21 25337/week @ 2024-11-28 16498/week @ 2024-12-05

88,605 downloads per month
Used in 22 crates (5 directly)

BSD-3-Clause

95KB
2K SLoC

octseq - Generic Octets Sequences

Octets sequences, i.e., variable length sequences of bytes, require a varying amount of memory and different use cases suggest different strategies to manage that memory: references to u8 slices, Vec<u8>, Arc<[u8]> are examples provided by the standard library.

In many cases, underlying memory management strategies don’t matter for composite types storing such octets sequences or for code manipulating them. Instead of insisting on a specific representation, these types and functions can be generic over the representation and describe the necessary properties through trait bounds.

This crate provides a set of such traits that describe basic functionality of octets sequences as well as buffers to construct such sequences, termed octets builders, conversions between sequences and builders.

It also provides some helper types that simplify common tasks such as parsing data from an octets sequence.

For details, please see the crate documentation on docs.rs.

Contributing

If you have comments, proposed changes, or would like to contribute, please open an issue in the Github repository. In particular, if you would like to use the crate but it is missing functionality for your use case, we would love to hear from you!

License

The octseq crate is distributed under the terms of the BSD-3-clause license. See LICENSE for details.

Dependencies

~0–325KB