#compact #byte #mutable #small #memory

compact_bytes

A memory efficient bytes container that transparently stores bytes on the stack, when possible

5 releases

0.1.4 Apr 25, 2025
0.1.3 Jun 7, 2024
0.1.2 May 31, 2024
0.1.1 Nov 10, 2023
0.1.0 Oct 31, 2023

#774 in Encoding

Download history 2342/week @ 2025-01-11 2064/week @ 2025-01-18 2384/week @ 2025-01-25 3369/week @ 2025-02-01 4058/week @ 2025-02-08 1855/week @ 2025-02-15 3067/week @ 2025-02-22 2750/week @ 2025-03-01 2192/week @ 2025-03-08 2786/week @ 2025-03-15 1947/week @ 2025-03-22 1835/week @ 2025-03-29 2693/week @ 2025-04-05 2723/week @ 2025-04-12 2305/week @ 2025-04-19 1413/week @ 2025-04-26

9,528 downloads per month
Used in 7 crates (via merde_core)

MIT/Apache

40KB
688 lines

compact_bytes

A memory efficient bytes container that can store up to 23 bytes on the stack.




Note from the Maintainer

This crate was mostly developed for Materialize out of a need for a more compact bytes container. It entirely borrows implementation from compact_str which has been thoughtfully maintained over the past few years by a number of dedicated contributors, including:

For now this repository exists separately from compact_str because it's easier to get started that way. But the plan is to eventually merge the two.

Dependencies

~135–350KB