1
0
mirror of https://github.com/amitbet/vncproxy.git synced 2025-04-30 12:03:19 +00:00
vncproxy/common/encoding.go
amit bezalel 007e748c61 added RfbReaderHelper which wraps the connection reader and allows to add listeners like the recorder or proxy
added fbs recorder, and tested it against vine vnc server 5.0.1 and rfbplayer 1.4 —> works! (there is still some problem with tight VNC server)
2017-06-17 11:02:06 +03:00

25 lines
636 B
Go

package common
// An Encoding implements a method for encoding pixel data that is
// sent by the server to the client.
type Encoding interface {
// The number that uniquely identifies this encoding type.
Type() int32
// Read reads the contents of the encoded pixel data from the reader.
// This should return a new Encoding implementation that contains
// the proper data.
Read(*PixelFormat, *Rectangle, *RfbReadHelper) (Encoding, error)
}
const (
EncodingRaw = 0
EncodingCopyRect = 1
EncodingRRE = 2
EncodingCoRRE = 4
EncodingHextile = 5
EncodingZlib = 6
EncodingTight = 7
EncodingZRLE = 16
)