compression

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: MIT Imports: 2 Imported by: 1

Documentation

Overview

Package compression is a horrible hack & should be replaced as soon as humanly possible

Index

Constants

This section is empty.

Variables

View Source
var Codes = map[string]Type{
	"": None,
}

Codes maps a hash code to it's name

View Source
var Names = map[Type]string{
	None: "",
	Gzip: "gzip",
	Tar:  "tar",
}

Names maps the name of a hash to codes

Functions

This section is empty.

Types

type Type

type Type int

Type represents a type of byte compression

const (
	// None speficies no compression
	None Type = iota
	// Gzip specifies Gzip compression
	Gzip
	// Tar specifies tar compression
	Tar
)

func ParseTypeString

func ParseTypeString(s string) (t Type, err error)

ParseTypeString returns a compression type for a given string

func (Type) MarshalJSON

func (t Type) MarshalJSON() ([]byte, error)

MarshalJSON satisfies the json.Marshaler interface

func (Type) String

func (t Type) String() string

String satisfies the stringer interface

func (*Type) UnmarshalJSON

func (t *Type) UnmarshalJSON(data []byte) error

UnmarshalJSON satisfies the json.Unmarshaler interface

Jump to

Keyboard shortcuts

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