Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ use ::dictionary::{kBrotliDictionary, kBrotliDictionaryOffsetsByLength,
kBrotliMinDictionaryWordLength};
pub use huffman::{HuffmanCode, HuffmanTreeGroup};
#[repr(C)]
#[no_mangle]
#[derive(Debug)]
pub enum BrotliResult {
ResultSuccess = 1,
Expand Down
5 changes: 0 additions & 5 deletions src/ffi/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ pub enum c_void{
_Nothing = 0,
}

#[no_mangle]
#[repr(C)]
#[allow(dead_code)]
pub enum BrotliDecoderParameter {
Expand All @@ -15,7 +14,6 @@ pub enum BrotliDecoderParameter {


#[repr(C)]
#[no_mangle]
pub enum BrotliDecoderResult {
BROTLI_DECODER_RESULT_ERROR = 0,
BROTLI_DECODER_RESULT_SUCCESS = 1,
Expand All @@ -34,15 +32,12 @@ impl From<BrotliResult> for BrotliDecoderResult {
}
}
}
#[no_mangle]
pub type brotli_alloc_func = Option<extern "C" fn(data: *mut c_void, size: usize) -> *mut c_void>;

#[no_mangle]
pub type brotli_free_func = Option<extern "C" fn(data: *mut c_void, ptr: *mut c_void) -> ()>;


#[repr(C)]
#[no_mangle]
#[derive(Clone)]
pub struct CAllocator {
pub alloc_func: brotli_alloc_func,
Expand Down
2 changes: 0 additions & 2 deletions src/ffi/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![cfg(not(feature="safe"))]

#[no_mangle]
#[cfg(feature="std")]
use std::{thread,panic, io, boxed, any, string};
#[cfg(feature="std")]
Expand Down Expand Up @@ -39,7 +38,6 @@ type BrotliAdditionalErrorData = boxed::Box<any::Any + Send + 'static>;
type BrotliAdditionalErrorData = ();

#[repr(C)]
#[no_mangle]
pub struct BrotliDecoderState {
pub custom_allocator: CAllocator,
pub decompressor: ::BrotliState<SubclassableAllocator,
Expand Down
1 change: 0 additions & 1 deletion src/huffman/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ pub const BROTLI_HUFFMAN_MAX_TABLE_SIZE: u32 = 1080;
pub const BROTLI_HUFFMAN_MAX_CODE_LENGTH_CODE_LENGTH: u32 = 5;

#[repr(C)]
#[no_mangle]
#[derive(PartialEq, Copy, Clone, Debug)]
pub struct HuffmanCode {
pub value: u16, // symbol value or table offset
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ pub fn copy_from_to<R: io::Read, W: io::Write>(mut r: R, mut w: W) -> io::Result
Ok(out_size)
}

#[no_mangle]
#[repr(C)]
pub struct BrotliDecoderReturnInfo {
pub decoded_size: usize,
Expand Down
1 change: 0 additions & 1 deletion src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pub enum WhichTreeGroup {
}
#[repr(C)]
#[derive(Clone,Copy, Debug)]
#[no_mangle]
pub enum BrotliDecoderErrorCode{
BROTLI_DECODER_NO_ERROR = 0,
/* Same as BrotliDecoderResult values */
Expand Down