1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors
//! BtrBlocks-specific compressor wrapping the generic [`CascadingCompressor`].
use Deref;
use ArrayRef;
use ExecutionCtx;
use VortexResult;
use VortexSession;
use crateBtrBlocksCompressorBuilder;
use crateCascadingCompressor;
/// The BtrBlocks-style compressor with all built-in schemes pre-registered.
///
/// This is a thin wrapper around [`CascadingCompressor`]. [`from_session`](Self::from_session)
/// uses the schemes registered in the session's [`CompressionSession`](crate::CompressionSession)
/// whose produced encodings the session registers and its enabled editions permit.
///
/// # Examples
///
/// ```rust
/// use vortex_btrblocks::{
/// BtrBlocksCompressor, BtrBlocksCompressorBuilder, CompressionSession, Scheme, SchemeExt,
/// };
/// use vortex_btrblocks::schemes::integer::IntDictScheme;
/// use vortex_session::VortexSession;
///
/// let session = VortexSession::empty().with::<CompressionSession>();
///
/// // Compressor with the session's schemes, restricted to the encodings it allows. This session
/// // enables no editions, so every scheme is dropped.
/// let compressor = BtrBlocksCompressor::from_session(&session);
///
/// // Remove specific schemes using the builder.
/// let compressor = BtrBlocksCompressorBuilder::from_session(&session)
/// .exclude_schemes([IntDictScheme.id()])
/// .build();
/// ```
;