rust-bitcoin-unsafe-fast/bitcoin
Tobin C. Harding 263a8b3603
Require BufRead instead of Read
Our decoding code reads bytes in very small chunks. Which is not
efficient when dealing with the OS where the cost of a context switch is
significant. People could already buffer the data but it's easy to
forget it by accident.

This change requires the new `io::BufRead` trait instead of `io::Read`
in all bounds.

Code such as `Transaction::consensus_decode(&mut File::open(foo))` will
break after this is applied, uncovering the inefficiency.

This was originally Kix's work, done before we had the `io` crate.
Changes to `bitcoin` were originally his, any new mistakes are my own.
Changes to `io` are mine.

Co-developed-by: Martin Habovstiak <martin.habovstiak@gmail.com>
2024-01-16 14:36:00 +11:00
..
contrib bitcoin: Add DO_FEATURE_MATRIX 2023-12-06 10:09:05 +11:00
embedded Implement `CompressedPublicKey` 2023-12-12 15:16:16 +01:00
examples 2023-12-17 automated rustfmt nightly 2023-12-17 00:59:05 +00:00
src Require BufRead instead of Read 2024-01-16 14:36:00 +11:00
tests Use NetworkKind in bip32 module 2023-12-15 11:50:50 +11:00
CHANGELOG.md Remove no-std feature 2023-12-06 09:54:33 +11:00
Cargo.toml Add bitcoin-units crate 2023-12-11 08:52:31 +11:00
build.rs Bump MSRV to Rust version 1.56.1 2023-11-23 06:20:02 +11:00