pub struct Decompressor<P> where
    P: PageIterator, 
{ /* private fields */ }
Available on crate feature io_parquet only.
Expand description

Decompressor that allows re-using the page buffer of [PageIterator].

Implementation

The implementation depends on whether a page is compressed or not.

PageReader(a), CompressedPage(b), Decompressor(c), DecompressedPage(d)

un-compressed pages:

page iter: a is swapped with b decompress iter: b is swapped with d, b is swapped with a therefore:

  • PageReader has its buffer back
  • Decompressor’s buffer is un-used
  • DecompressedPage has the same data as CompressedPage had

compressed pages:

page iter: a is swapped with b decompress iter:

  • b is decompressed into c
  • b is swapped with a
  • c is moved to d
  • (next iteration): d is moved to c therefore, while the page is available:
  • PageReader has its buffer back
  • Decompressor’s buffer empty
  • DecompressedPage has the decompressed buffer after the page is used:
  • PageReader has its buffer back
  • Decompressor has its buffer back
  • DecompressedPage has an empty buffer

Implementations

Creates a new Decompressor.

Returns two buffers: the first buffer corresponds to the page buffer, the second to the decompression buffer.

Trait Implementations

The type being iterated over.

The error type of iteration.

Advances the iterator to the next position. Read more

Returns the current element. Read more

Advances the iterator, returning the next element. Read more

Returns bounds on the number of remaining elements in the iterator.

Determines if all elements of the iterator satisfy a predicate.

Determines if any elements of the iterator satisfy a predicate.

Borrows an iterator, rather than consuming it. Read more

Returns the number of remaining elements in the iterator.

Returns an iterator which filters elements by a predicate.

Returns the first element of the iterator which satisfies a predicate.

Calls a closure on each element of an iterator.

Returns an iterator which is well-behaved at the beginning and end of iteration.

Returns an iterator which applies a transform to elements.

Returns an iterator which applies a transform to elements. Read more

Returns an iterator that applies a transform to errors.

Returns the nth element of the iterator.

Returns the position of the first element matching a predicate.

Returns an iterator which skips the first n elements.

Returns an iterator which skips the first sequence of elements matching a predicate.

Returns an iterator which only returns the first n elements.

Returns an iterator which only returns the first sequence of elements matching a predicate.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.