summaryrefslogtreecommitdiffstats
path: root/buffered-reader
AgeCommit message (Collapse)Author
2018-12-18Release 0.3.0.v0.3.0Justus Winter
2018-11-27Fix the gitlab badges.Justus Winter
2018-11-26Release 0.2.0.v0.2.0Justus Winter
2018-11-26buffered-reader: Add a README.Justus Winter
2018-11-24Fix mail address.Justus Winter
2018-11-24Update packaging metadata in preparation for a release.Justus Winter
2018-11-16buffered-reader: Require that BufferedReaders implement Display.Neal H. Walfield
- Also, update BufferedReaders to implement it.
2018-10-15buffered-reader: Fix compilation on windows.Sebastian Thiel
2018-10-04buffered-reader: Ignore EINTR.Neal H. Walfield
- If we get an EINTR while reading, automatically retry.
2018-10-04buffered-reader: Provide default implementations for more methodsNeal H. Walfield
- Since it is possible to provide an efficient default implementation of data_consume and data_consume_hard, we should do so.
2018-10-04buffered-reader: Add an assert.Neal H. Walfield
2018-10-04buffered-reader: Rework documentation.Neal H. Walfield
2018-10-02buffered-reader: Fix BufferedReaderGeneric::data_hard.Neal H. Walfield
- Calling BufferedReaderGeneric::data_hard with amount greater than 0 on an empty file should return an error, not an empty buffer.
2018-10-02buffered-reader,openpgp: Simplify BufferedReaders' debugging outputNeal H. Walfield
- BufferedReaders are often nested. Print the current reader's state first and the inner reader last so that the debugging output is more readable.
2018-10-01buffered-reader: Don't read more than we have space forNeal H. Walfield
2018-09-26buffered-reader: Add a new reader, BufferedReaderReserveNeal H. Walfield
- This buffered reader prevents the reader from reading the last X bytes of the underlying buffered reader.
2018-09-17buffered-reader: Add mmapping BufferedReaderFile variant.Justus Winter
- Fixes #98.
2018-09-17buffered-reader: Add a new buffered reader for files.Justus Winter
2018-07-29buffered-reader: Provide a mechanism to rewind a BufferedReaderDupNeal H. Walfield
- New method BufferedReaderDup::rewind.
2018-07-24buffered-reader: Add a function to read to a particular byteNeal H. Walfield
- This is useful for reading a line at a time.
2018-07-17buffered-reader: Typo.Justus Winter
2018-07-16buffered-reader: Have drop_eof return if any content was droppedNeal H. Walfield
2018-06-20Make sure there is always a whitespace after every comma.Justus Winter
- This is the result of executing find . \( -type f -and \( -name '*.rs' -or -name '*.h' \) \) \ -exec sed -i -e 's/,\([^[:space:]]\)/, \1/g' {} \; with one manual tweak in 'parse.rs'.
2018-06-19openpgp, buffered-reader: Make compression an optional feature.Justus Winter
- This helps to reduce the trusted computing base if compression is not needed. - This makes it easier to fuzz Sequoia, previously the fuzzer was doing a great job creating compression bombs that triggered the fuzzers timeout. - Currently, the cargo workspace feature does not propagate --no-default-features, but it is possible to depend on the openpgp crate with `default-features = false`. - Unfortunately, a lot of test cases include compressed packages. This change conditionally disables these tests.
2018-04-19buffered-reader: Fix performance problem.Neal H. Walfield
- Fix the "linked list" performance problem described in 9619dff for BufferedReaderDup.
2018-04-11buffered-reader: Add BufferedReaderDup.Neal H. Walfield
- Add a new BufferedReader implementation that allows using a BufferedReader as usual, but without actually consuming the data.
2018-04-10buffered-reader: Fix performance problem.Justus Winter
- Previously, BufferedReaderLimitor::into_inner() boxed its reader, creating a linked list of redirections to follow whenever the reader was used. This lead to a significant slowdown. - We can fix this by making BufferedReaderLimitor polymorphic over boxed BufferedReaders. Now into_inner() can just return the already boxed reader. - All non-trivial implementations of BufferedReader::into_inner() have this problem, however, the BufferedReaderLimitor is used once for every parsed packet, so it was the most pressing one to fix. - In the future, we may make BufferedReader::into_inner() return an 'impl BufferedReader' instead.
2018-03-20openpgp,buffered-reader: Prefer access functions.Neal H. Walfield
- Don't access the inner BufferedReader directly, use the get_ref() function, thereby eliminates duplicate code.
2018-03-12Bump dependencies.Justus Winter
2018-02-25buffered-reader: Add a new reader, BufferedReaderEOF.Neal H. Walfield
- This reader always returns EOF. This is primarily useful for when we need to mem::replace a reader due to some lifetime issues.
2018-02-25buffered-reader: Provide a method to get the internal buffer.Neal H. Walfield
- data() returns the internal buffer, but needs a mutable reference. This new function, buffer(), returns the internal buffer with a normal reference.
2018-02-23buffered-reader: Add methods to get a reference to the inner reader.Neal H. Walfield
- To be able to walk a stack of buffered readers without consuming them, add the get_mut and get_ref methods to the `BufferedReader` trait.
2018-01-02buffered_reader: Allow the user to store data in a BufferedReader.Neal H. Walfield
- We want to associate some data with a BufferedReader instance. Because a BufferedReader points to another BufferedReader, we can't use a wrapper object. This change provides a mechanism to store any required data inside the actual `BufferedReader`. Note: this is a zero-cost abstraction. If no data needs to be stored, then there is no cost.
2018-01-02buffered-reader: Restore missing import.Neal H. Walfield
- e03cca1d751d907c490d1f3d145086d391639979 removed the `use std::str` clause, which was not actually used by the main code, but was used by a test case. Restore the import, but only when it is actually needed.
2018-01-02buffered-reader: Remove unused import.Justus Winter
2017-12-18Documentation improvements.Neal H. Walfield
2017-12-16openpgp: Add a setting to the PacketParser to buffer unread contentNeal H. Walfield
- Add a setting to the PacketParser to enable buffering of unread content when the PacketParser is advanced.
2017-12-16buffered-reader: Fix buglet.Neal H. Walfield
- Fix how the amount of data to consume is computed in BufferedReaderMemory::data_consume.
2017-12-13Split up Sequoia.Justus Winter
- Split up into six crates: buffered-reader, openpgp, sequoia-core, sequoia-ffi, sequoia-net, and sequoia-store. - Adjust imports accordingly.