autozstd 0.1.1

High performance Zstd envelope compression with fallback / 基于信封模式与回退机制的高性能 Zstd 压缩
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::{io::Error as IoError, result};

use thiserror::Error;

#[derive(Error, Debug)]
pub enum Error {
  #[error("data is empty")]
  Empty,

  #[error("invalid type byte: {0}")]
  InvalidType(u8),

  #[error(transparent)]
  Zstd(#[from] IoError),
}

pub type Result<T> = result::Result<T, Error>;