pub fn decode_bytes(input: &[u8], format: DecodeFormat) -> Result<Vec<u8>>Expand description
Decode a byte buffer as one format and concatenate decoded regions.
§Errors
Returns Error::DecodeConfig if the default rules are invalid.
Returns Error::Decode if the GPU decode dispatch fails.
Returns Error::Gpu if the GPU device cannot be initialized or a buffer operation fails.
§Examples
use vyre_wgpu::engine::decode::{decode_bytes, DecodeFormat};
let input = b"SGVsbG8=";
let decoded = decode_bytes(input, DecodeFormat::Base64)?;
assert_eq!(decoded, b"Hello");