compress

package
v0.0.0-...-24ede6c Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package compress provides functions used for decompressing MPQ file sectors

Index

Constants

This section is empty.

Variables

Functions

func Decompress1

func Decompress1(in_bytes []byte) (out_bytes []byte, err error)

func Decompress2

func Decompress2(in_bytes []byte) (out_bytes []byte, err error)

func Decompress_ADPCM_mono

func Decompress_ADPCM_mono(in_bytes []byte) (out_bytes []byte, err error)

func Decompress_ADPCM_stereo

func Decompress_ADPCM_stereo(in_bytes []byte) (out_bytes []byte, err error)

func Decompress_Huffman

func Decompress_Huffman(in_bytes []byte) (out_bytes []byte, err error)

func Decompress_LZMA

func Decompress_LZMA(in_bytes []byte) (out_bytes []byte, err error)

func Decompress_PKWARE_DCL

func Decompress_PKWARE_DCL(in_bytes []byte) (out_bytes []byte, err error)

func Decompress_Sparse

func Decompress_Sparse(in_bytes []byte) (out_bytes []byte, err error)

func Decompress_bzip2

func Decompress_bzip2(in_bytes []byte) (out_bytes []byte, err error)

func Decompress_zlib

func Decompress_zlib(in_bytes []byte) (out_bytes []byte, err error)

Types

type DecompressTableEntry

type DecompressTableEntry struct {
	Type
	Decompressor
}

type Decompressor

type Decompressor func(in_bytes []byte) (out_bytes []byte, err error)

type Type

type Type uint32
const (
	Huffman      Type = 0x01       // Huffmann compression (used on WAVE files only)
	Zlib         Type = 0x02       // ZLIB compression
	PKWARE       Type = 0x08       // PKWARE DCL compression
	Bzip2        Type = 0x10       // BZIP2 compression (added in Warcraft III)
	Sparse       Type = 0x20       // Sparse compression (added in Starcraft 2)
	ADPCM_mono   Type = 0x40       // IMA ADPCM compression (mono)
	ADPCM_stereo Type = 0x80       // IMA ADPCM compression (stereo)
	LZMA         Type = 0x12       // LZMA compression. Added in Starcraft 2. This value is NOT a combination of flags.
	NextSame     Type = 0xFFFFFFFF // Same compression
)

Jump to

Keyboard shortcuts

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