Struct parquet2::read::Decompressor
source · [−]pub struct Decompressor<R: Read> { /* private fields */ }
Expand description
Decompressor that allows re-using the page buffer of PageIterator
.
Implementation
The implementation depends on whether a page is compressed or not.
PageIterator(a)
,CompressedPage(b)
,Decompressor(c)
,DecompressedPage(d)
un-compressed pages:
page iter:
a
is swapped withb
decompress iter:b
is swapped withd
,b
is swapped witha
therefore:
PageIterator
has its buffer backDecompressor
’s buffer is un-usedDecompressedPage
has the same data asCompressedPage
had
compressed pages:
page iter:
a
is swapped withb
decompress iter:
b
is decompressed intoc
b
is swapped witha
c
is moved tod
- (next iteration):
d
is moved toc
therefore, while the page is available:
PageIterator
has its buffer backDecompressor
’s buffer emptyDecompressedPage
has the decompressed buffer after the page is used:PageIterator
has its buffer backDecompressor
has its buffer backDecompressedPage
has an empty buffer
Implementations
Creates a new Decompressor
.
Trait Implementations
type Error = ParquetError
type Error = ParquetError
The error type of iteration.
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.
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 sequence of elements matching a predicate.
Returns an iterator which only returns the first n
elements.