czlib

package
v0.1.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package czlib 采用zlib压缩实现的net.conn接口

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	net.Conn
	// contains filtered or unexported fields
}

Conn is a generic stream-oriented network connection with gzip

func New

func New(conn net.Conn) *Conn

New new a zlib compress

func NewLevel

func NewLevel(conn net.Conn, level int) *Conn

NewLevel new a zlib compress with the level level see zlib package

func NewLevelDict

func NewLevelDict(conn net.Conn, level int, dict []byte) *Conn

NewLevelDict new a zlib compress with the level and dict level see zlib package

func (*Conn) Read

func (sf *Conn) Read(p []byte) (int, error)

Read reads data from the connection.

func (*Conn) Write

func (sf *Conn) Write(p []byte) (int, error)

Write writes data to the connection.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL