Skip to content

Commit bd8890a

Browse files
committed
make dictionary pub and static, for sharing with comrpession library, and expose the io_wrappers in a public manner
1 parent 82d89f7 commit bd8890a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "brotli-decompressor"
3-
version = "1.0.8"
3+
version = "1.0.9"
44
authors = ["Daniel Reiter Horn <[email protected]>", "The Brotli Authors"]
5-
description = "A brotli decompressor that with an interface avoiding the rust stdlib. This makes it suitable for embedded devices and kernels. It is designed with a pluggable allocator so that the standard lib's allocator may be employed. The default build also includes a stdlib allocator and stream interface. Disable this with --features=no-stdlib. Alternatively, --features=unsafe turns off array bounds checks and memory initialization but provides a safe interface for the caller. Without adding the --features=unsafe argument, all included code is safe."
5+
description = "A brotli decompressor that with an interface avoiding the rust stdlib. This makes it suitable for embedded devices and kernels. It is designed with a pluggable allocator so that the standard lib's allocator may be employed. The default build also includes a stdlib allocator and stream interface. Disable this with --features=no-stdlib. Alternatively, --features=unsafe turns off array bounds checks and memory initialization but provides a safe interface for the caller. Without adding the --features=unsafe argument, all included code is safe. For compression in addition to this library, download https://github.com/dropbox/rust-brotli"
66
license = "BSD-3-Clause/MIT"
77
documentation = "https://github.com/google/brotli/tree/master/docs"
88
homepage = "https://github.com/dropbox/rust-brotli-decompressor"

src/dictionary/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub const kBrotliMinDictionaryWordLength: u8 = 4;
1515
pub const kBrotliMaxDictionaryWordLength: u8 = 24;
1616

1717
#[allow(non_upper_case_globals)]
18-
pub const kBrotliDictionary: [u8; 122784] =
18+
pub static kBrotliDictionary: [u8; 122784] =
1919
[0x74, 0x69, 0x6d, 0x65, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x66, 0x65, 0x6c, 0x65, 0x66, 0x74,
2020
0x62, 0x61, 0x63, 0x6b, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x61, 0x74, 0x61, 0x73, 0x68, 0x6f, 0x77,
2121
0x6f, 0x6e, 0x6c, 0x79, 0x73, 0x69, 0x74, 0x65, 0x63, 0x69, 0x74, 0x79, 0x6f, 0x70, 0x65, 0x6e,

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub use alloc::HeapAlloc;
2222
pub use alloc::HeapAllocUninitialized;
2323
#[macro_use]
2424
mod memory;
25-
mod dictionary;
25+
pub mod dictionary;
2626
#[macro_use]
2727
mod bit_reader;
2828
mod huffman;
@@ -32,7 +32,7 @@ mod context;
3232
mod transform;
3333
mod test;
3434
mod decode;
35-
mod io_wrappers;
35+
pub mod io_wrappers;
3636
pub mod reader;
3737
pub mod writer;
3838
pub use huffman::{HuffmanCode, HuffmanTreeGroup};
@@ -50,7 +50,7 @@ pub use writer::{DecompressorWriter};
5050
// use io_wrappers::write_all;
5151
pub use io_wrappers::{CustomRead, CustomWrite};
5252
#[cfg(not(feature="no-stdlib"))]
53-
pub use io_wrappers::{IntoIoReader, IoReaderWrapper, IoWriterWrapper};
53+
pub use io_wrappers::{IntoIoReader, IoReaderWrapper, IntoIoWriter, IoWriterWrapper};
5454

5555
// interface
5656
// pub fn BrotliDecompressStream(mut available_in: &mut usize,

0 commit comments

Comments
 (0)