Skip to content

v0.1.0

Choose a tag to compare

@sw-release-bot sw-release-bot released this 10 Oct 08:24
· 42 commits to main since this release
117f597

Changed

  • (decode) [breaking] start the first frame on the first read (#561)

Migrating from 0.0.x

StreamingDecoder::new and StreamingDecoder::new_with_decoder return the decoder itself instead of a Result. They read nothing from the source: the first frame header, any skippable frames in front of it, and their errors (an empty source, input that is not zstd, a damaged header) come from the first read or read_to_end, as an io::Error carrying the FrameDecoderError.

// 0.0.x
let mut decoder = StreamingDecoder::new(source)?;
// 0.1.0
let mut decoder = StreamingDecoder::new(source);
decoder.read_to_end(&mut out)?; // a bad first frame fails here
  • A decoder that was built but never read hands its source back untouched through into_inner, and a damaged first frame no longer drops an owned source: the read fails and into_inner still returns it.
  • The dictionary constructors (new_with_dictionary_handle, new_with_dictionary_bytes, new_with_decoder_and_dictionary_handle) still return a Result, which now fails only on dictionary content.
  • FrameDecoderError::FailedToReadSkippableFrame is removed: a source error inside a leading skippable frame comes back as the source reported it.

Not in this release

  • The rejection of frames with the reserved descriptor bit set (#562) landed after 0.1.0 and ships in 0.1.1.
  • The entries previously listed here (#558, #554, #549) belong to 0.0.59.