Age | Commit message (Collapse) | Author |
|
|
|
|
|
- Previously, if the underlying reader returned less data than
'amount', the limit would still be reduced by 'amount'.
|
|
|
|
|
|
|
|
- For example, `buffered_reader::BufferedReaderMemory` is now called
`buffered_reader::Memory`. This makes the type names less unwieldy.
- Fixes #206.
|
|
- According to the BufferedReader interface it is okay to return
short reads on `BufferedReader::data_consume()`.
- If `BufferedReader::data_consume_hard()` is called, return
UnexpectedEof instead of panicking.
- Fixes #207.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Also, update BufferedReaders to implement it.
|
|
|
|
- If we get an EINTR while reading, automatically retry.
|
|
- Since it is possible to provide an efficient default
implementation of data_consume and data_consume_hard, we should do
so.
|
|
|
|
|
|
- Calling BufferedReaderGeneric::data_hard with amount greater than
0 on an empty file should return an error, not an empty buffer.
|
|
- BufferedReaders are often nested. Print the current reader's
state first and the inner reader last so that the debugging output
is more readable.
|
|
|
|
- This buffered reader prevents the reader from reading the last X
bytes of the underlying buffered reader.
|
|
- Fixes #98.
|
|
|
|
- New method BufferedReaderDup::rewind.
|
|
- This is useful for reading a line at a time.
|
|
|
|
|
|
- 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'.
|
|
- 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.
|
|
- Fix the "linked list" performance problem described in 9619dff for
BufferedReaderDup.
|
|
- Add a new BufferedReader implementation that allows using a
BufferedReader as usual, but without actually consuming the data.
|
|
- 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.
|
|
- Don't access the inner BufferedReader directly, use the get_ref()
function, thereby eliminates duplicate code.
|
|
|
|
- This reader always returns EOF. This is primarily useful for when
we need to mem::replace a reader due to some lifetime issues.
|
|
- data() returns the internal buffer, but needs a mutable reference.
This new function, buffer(), returns the internal buffer with a
normal reference.
|
|
- 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.
|
|
- 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.
|
|
- 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.
|
|
|
|
|
|
- Add a setting to the PacketParser to enable buffering of unread
content when the PacketParser is advanced.
|
|
- Fix how the amount of data to consume is computed in
BufferedReaderMemory::data_consume.
|
|
- Split up into six crates: buffered-reader, openpgp, sequoia-core,
sequoia-ffi, sequoia-net, and sequoia-store.
- Adjust imports accordingly.
|