scodec/scodec-bits — pull request #2 by pchiusano (2014-02-26 03:53:48+00:00)
Title: New ByteVector implementation

Based on balanced binary trees. Most operations are logarithmic in the depth of this tree. Also added more tests for `ByteVector`. Other misc items:

* Added `copy` and `compact` to both `BitVector` and `ByteVector`. `compact` does not (necessarily) make a copy of the underlying bytes, if the vector consists of a single chunk, while `copy` always copies the bits/bytes to a fresh vector.
* Fixed a bug in `equals` implementation of `BitVector` that scalacheck discovered.
* Some ad hoc specializing of `ByteVector` to avoid boxing. None of this is public at the moment, just used as an implementation detail for efficiency.
* Operations like `map`, `zipWith`, `reverse` take constant time, and return views. You can use `copy` to materialize the result of an operation to a fresh vector.