File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ derive_more = { version = "2.0", default-features = false }
2020eyre = { workspace = true , optional = true }
2121thiserror = { version = " 2.0" , default-features = false }
2222zstd = { version = " =0.13.3" , optional = true }
23- ruzstd = { version = " 0.8" , optional = true }
23+ ruzstd = " 0.8"
2424
2525[dev-dependencies ]
2626eyre.workspace = true
@@ -30,4 +30,3 @@ serde_json = "1.0"
3030default = [" zstd" ]
3131test-utils = [" dep:eyre" , " scroll-l1/test-utils" ]
3232zstd = [" dep:zstd" ]
33- ruzstd = [" dep:ruzstd" ]
Original file line number Diff line number Diff line change 22
33use std:: io:: Read ;
44
5+ #[ cfg( feature = "zstd" ) ]
6+ use ruzstd as _;
7+
58/// The ZSTD magic number for zstd compressed data header.
69const ZSTD_MAGIC_NUMBER : [ u8 ; 4 ] = [ 0x28 , 0xb5 , 0x2f , 0xfd ] ;
710
8- #[ cfg( not( any( feature = "zstd" , feature = "ruzstd" ) ) ) ]
9- compile_error ! ( "Either feature \" zstd\" or \" ruzstd\" must be enabled for zstd support." ) ;
10-
1111/// Uncompress the provided data.
1212#[ cfg( feature = "zstd" ) ]
1313pub fn decompress_blob_data ( data : & [ u8 ] ) -> Vec < u8 > {
@@ -37,7 +37,7 @@ pub fn decompress_blob_data(data: &[u8]) -> Vec<u8> {
3737}
3838
3939/// Uncompress the provided data.
40- #[ cfg( feature = "ruzstd" ) ]
40+ #[ cfg( not ( feature = "zstd" ) ) ]
4141pub fn decompress_blob_data ( data : & [ u8 ] ) -> Vec < u8 > {
4242 use ruzstd:: decoding:: StreamingDecoder ;
4343
You can’t perform that action at this time.
0 commit comments