snap-buf 0.2.0

A copy on write byte buffer for efficient snapshotting
Documentation

A [SnapBuf] is like a Vec<u8> with cheap snapshotting using copy on write.

Internally, the data is broken up into segments that are organized in a tree structure. Only modified subtrees are cloned, so buffers with only little differences can share most of their memory. Moreover, subtrees which contain only zeros take up no memory.