4 releases (2 breaking)
|0.3.0||Mar 21, 2021|
|0.2.2||Sep 8, 2019|
|0.2.0||Mar 7, 2018|
|0.1.0||Aug 6, 2017|
36 downloads per month
Used in rsure
Weave File Support
Many of the tests compare the crates output with that generated by the sccs command. On many Linux distros, a compatible version can be found in the cssc package.
Implement Weave deltas, inspired by SCCS.
Although not much remains of the SCCS revision control system, it's "weave" delta format turns out to be a good way of representing multiple versions of data that differ only in parts.
This package implements a weave-based storage of "plain text", where plain text consists of lines of UTF-8 printable characters separated by a newline.
The format is similar to SCCS, but with no constraints to keep what are relatively poor design decisions from SCCS, such as putting a checksum at the top of the file, and using limited-sized field for values such as the number of lines in a file, or the use of 2-digit years. However, the main body of the weaved file, that which describes inserts and deletes is the same, and allows us to test this version by comparing with the storage of sccs.
Writing an initial weave works as a regular file writer. The file itself has a small amount of surrounding meta-data, but is otherwise mostly just the contents of the initial file.
Adding a delta to a weave file requires extracting a base version that the delta will be made against (the base does not need to be the tip version, allowing for branches). This crate will need to make several temporary files.