kcptun-rust 1.1.0

A Rust implementation of kcptun, a fast and reliable tunnel based on KCP protocol
Documentation
1
2
3
4
5
6
7
8
9
// Snappy 压缩流包装 - 类似 Go 版本的 CompStream
// 使用 tokio-snappy 库,它支持帧格式(framed format)以匹配 Go 版本的实现
// Go 版本使用 snappy.NewBufferedWriter 和 snappy.NewReader,这些使用帧格式

use tokio_snappy::SnappyIO;

/// 压缩流包装器 - 在 KCP 和 SMUX 之间添加 snappy 压缩
/// 使用 tokio-snappy 库,它支持帧格式以匹配 Go 版本的实现
pub type CompStream<T> = SnappyIO<T>;