Releases: jbethune/rust-twobit
Releases · jbethune/rust-twobit
0.2.0
Release date: Nov 25, 2021.
Added
- Added support for generic readers: not just buffered file readers, but any reader object that implements both
ReadandSeek. As a consequence,TwoBitFileis now generic overR: Read + Seek. - Added
boxed()method that converts the underlying reader objects to a boxed trait object in order to help with type erasure if needed. - Added constructor that reads a file into memory:
open_and_read(). - Added type aliases for convenience:
TwoBitPhysicalFilewhen reading from a buffered file object;TwoBitMemoryFilewhen reading a file into memory first;BoxTwoBitFilewhen boxing the internal reader. - Added constructor that reads from a given buffer:
from_buf(). - Added
error::Resulttype alias.
Changed
- Core parsing routines have been rewritten from scratch, yielding an order of magnitude performance improvement.
- Remove
softmask_enabledfrom constructors. This option is now disabled by default and can be enabled viaenable_softmask()method. - All methods that involve reading are now
&mut self. sequence()method has been renamed toread_sequence().- Replaced
chroms()method withchrom_names()andchrom_sizes()methods. - Removed all potential panics in reading methods.
- Updated the docs, the code is now clippy-compliant, enabled CI, added benches.
- Removed
full_*()methods; instead, all reading methods now expect ranges. In order to read the entire sequence,..range can be passed in.