smbcompression

package
v0.0.0-...-c8c792b Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package smbcompression defines structures and identifiers for SMB compression.

Index

Constants

View Source
const (
	None        = 0x0000
	LZNT1       = 0x0001
	LZ77        = 0x0002
	LZ77Huffman = 0x0003
)

Possible compression algorithms.

Variables

This section is empty.

Functions

This section is empty.

Types

type Algorithm

type Algorithm uint16

Algorithm identifies a type of compression algorithm.

https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/78e0c942-ab41-472b-b117-4a95ebe88271

func (Algorithm) String

func (a Algorithm) String() string

String returns a string representation of the compression algorithm.

type Capabilities

type Capabilities []byte

Capabilities interprets a slice of bytes as a set of compression capabilities during SMB 3.1.1 protocol negotiation.

https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/78e0c942-ab41-472b-b117-4a95ebe88271

func (Capabilities) AlgorithmCount

func (c Capabilities) AlgorithmCount() uint16

AlgorithmCount returns the number of supported compression algorithms.

func (Capabilities) Algorithms

func (c Capabilities) Algorithms() List

Algorithms returns the list of supported compression algorithms.

func (Capabilities) SetAlgorithmCount

func (c Capabilities) SetAlgorithmCount(count uint16)

SetAlgorithmCount sets the number of supported compression algorithms.

type List

type List []byte

List interprets a slice of bytes as an SMB compression algorithm list.

func (List) Contains

func (k List) Contains(a Algorithm) bool

Contains returns true if the list contains a.

func (List) Count

func (k List) Count() int

Count returns the number of algorithms present in the list.

func (List) Member

func (k List) Member(i int) Algorithm

Member returns the list member at position i.

Jump to

Keyboard shortcuts

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