smaz

package module
v0.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: ISC Imports: 0 Imported by: 1

README

smaz

SMAZ Compression Algorithm in Pure Go, Python, and PHP

Documentation

Overview

Package smaz implements the Smaz compression algorithm for small strings. Based on the original smaz library by antirez.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(input []byte) ([]byte, error)

Compress compresses a byte slice using the Smaz algorithm

func CompressString

func CompressString(s string) ([]byte, error)

CompressString compresses a string to bytes

func Decompress

func Decompress(input []byte) ([]byte, error)

Decompress decompresses Smaz-compressed data

func DecompressString

func DecompressString(data []byte) (string, error)

DecompressString decompresses bytes to a string

func MustCompress

func MustCompress(input []byte) []byte

MustCompress compresses data and panics on error

func MustDecompress

func MustDecompress(input []byte) []byte

MustDecompress decompresses data and panics on error

Types

type SmazError

type SmazError struct {
	// contains filtered or unexported fields
}

SmazError represents an error during compression/decompression

func (*SmazError) Error

func (e *SmazError) Error() string

Directories

Path Synopsis
cmd
smaz command

Jump to

Keyboard shortcuts

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