Sha256: 9760ad629e441b0294623e72ee4f3d9ef270ad31550beeff7ea5f45e956e4adb

Contents?: true

Size: 497 Bytes

Versions: 11

Compression:

Stored size: 497 Bytes

Contents

#![cfg_attr(not(feature = "use_std"), no_std)]

// In the future, don't do this.
mod dec;
mod enc;
pub use crate::dec::*;
pub use crate::enc::*;

/// Calculates the maximum possible size of an encoded message given the length
/// of the source message. This may be useful for calculating how large the
/// `dest` buffer needs to be in the encoding functions.
pub fn max_encoding_length(source_len: usize) -> usize {
    source_len + (source_len / 254) + if source_len % 254 > 0 { 1 } else { 0 }
}

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/cobs-0.2.3/src/lib.rs
wasmtime-28.0.0 ./ext/cargo-vendor/cobs-0.2.3/src/lib.rs
wasmtime-27.0.0 ./ext/cargo-vendor/cobs-0.2.3/src/lib.rs
wasmtime-26.0.0 ./ext/cargo-vendor/cobs-0.2.3/src/lib.rs
wasmtime-25.0.2 ./ext/cargo-vendor/cobs-0.2.3/src/lib.rs
wasmtime-25.0.1 ./ext/cargo-vendor/cobs-0.2.3/src/lib.rs
wasmtime-25.0.0 ./ext/cargo-vendor/cobs-0.2.3/src/lib.rs
wasmtime-24.0.0 ./ext/cargo-vendor/cobs-0.2.3/src/lib.rs
wasmtime-23.0.2 ./ext/cargo-vendor/cobs-0.2.3/src/lib.rs
wasmtime-22.0.0 ./ext/cargo-vendor/cobs-0.2.3/src/lib.rs
wasmtime-21.0.1 ./ext/cargo-vendor/cobs-0.2.3/src/lib.rs