Documentation
¶
Overview ¶
Package compress 主要实现了压缩方法
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GzipWriter ¶
type GzipWriter struct {
// contains filtered or unexported fields
}
GzipWriter Gzip压缩写入器
type NoneWriter ¶
type NoneWriter struct {
// contains filtered or unexported fields
}
NoneWriter 无压缩写入器
type ReadCloser ¶
ReadCloser 读取关闭器
func NewGzipReadCloser ¶
func NewGzipReadCloser(f *os.File) (r *ReadCloser, err error)
NewGzipReadCloser 获取gzip压缩读取关闭器
func NewNoneReadCloser ¶
func NewNoneReadCloser(f *os.File) *ReadCloser
NewNoneReadCloser 获取无压缩读取关闭器
func NewZipReadCloser ¶
func NewZipReadCloser(f *os.File) (r *ReadCloser, err error)
NewZipReadCloser 获取zip压缩读取关闭器
type Type ¶
type Type string
Type 压缩类型
const ( TypeNone Type = "" TypeTarGzip Type = "targz" TypeTar Type = "tar" TypeZip Type = "zip" TypeGzip Type = "gz" )
压缩类型枚举
func (Type) ReadCloser ¶
ReadCloser 获取读取关闭器
func (Type) WriteCloser ¶
WriteCloser 获取写入关闭器
type ZipReader ¶
type ZipReader struct {
// contains filtered or unexported fields
}
ZipReader zip的读取器
func NewZipReader ¶
NewZipReader 通过文件f创建zip读取器
type ZipWriter ¶
type ZipWriter struct {
// contains filtered or unexported fields
}
ZipWriter zip压缩写入器
func NewZipWriter ¶
NewZipWriter 创建zip压缩写入器
Click to show internal directories.
Click to hide internal directories.