@@ -41,20 +41,6 @@ const (
41
41
defaultLevelMultiplier = 10
42
42
)
43
43
44
- type CompressionProfile = block.CompressionProfile
45
-
46
- // Exported Compression constants.
47
- var (
48
- DefaultCompression = block .DefaultCompression
49
- NoCompression = block .NoCompression
50
- SnappyCompression = block .SnappyCompression
51
- ZstdCompression = block .ZstdCompression
52
- // MinLZCompression is only supported with table formats v6+. Older formats
53
- // fall back to snappy.
54
- MinLZCompression = block .MinLZCompression
55
- FastestCompression = block .FastestCompression
56
- )
57
-
58
44
// FilterType exports the base.FilterType type.
59
45
type FilterType = base.FilterType
60
46
@@ -419,7 +405,7 @@ type LevelOptions struct {
419
405
//
420
406
// The default value is Snappy for L0, or the function from the previous level
421
407
// for all other levels.
422
- Compression func () * CompressionProfile
408
+ Compression func () * sstable. CompressionProfile
423
409
424
410
// FilterPolicy defines a filter algorithm (such as a Bloom filter) that can
425
411
// reduce disk reads for Get calls.
@@ -467,7 +453,7 @@ func (o *LevelOptions) EnsureL0Defaults() {
467
453
o .BlockSizeThreshold = base .DefaultBlockSizeThreshold
468
454
}
469
455
if o .Compression == nil {
470
- o .Compression = func () * CompressionProfile { return SnappyCompression }
456
+ o .Compression = func () * sstable. CompressionProfile { return sstable . SnappyCompression }
471
457
}
472
458
if o .FilterPolicy == nil {
473
459
o .FilterPolicy = NoFilterPolicy
@@ -2115,7 +2101,7 @@ func (o *Options) Parse(s string, hooks *ParseHooks) error {
2115
2101
if profile == nil {
2116
2102
return errors .Errorf ("pebble: unknown compression: %q" , errors .Safe (value ))
2117
2103
}
2118
- l .Compression = func () * CompressionProfile { return profile }
2104
+ l .Compression = func () * sstable. CompressionProfile { return profile }
2119
2105
case "filter_policy" :
2120
2106
if hooks != nil && hooks .NewFilterPolicy != nil {
2121
2107
l .FilterPolicy , err = hooks .NewFilterPolicy (value )
0 commit comments