lzjs

package module
v0.0.0-...-5e18a23 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2018 License: GPL-3.0 Imports: 4 Imported by: 0

README

Port of lz-string.js to go

https://godoc.org/github.com/tcolgate/gostikkit/lzjs

This is an attempt at a simple translation of the reference implementation of lz-string to Go. This only sensinle use for this code is if you need absolute binary compatibility with lz-string.js.

Documentation

Overview

Package lzjs implements the lz-string data compress / decompression routines. It aims for full binary compatibility with lz-string

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(uncompressed string) []uint16

Compress is the basic routine to compress data to uint16, to match the utf16 data produced in lz-string

func CompressToBase64

func CompressToBase64(in string) string

CompressToBase64 takes a string and returns the base64 encoded, compressed data

func Decompress

func Decompress(compressed []uint16) (string, error)

Decompress is the basic routine to decompress the utf16 data produced in lz-string into the origin string

func DecompressFromBase64

func DecompressFromBase64(in string) (string, error)

DecompressFromBase64 takes a base64 encoded compressed blob and returns the origin, uncompressed data

Types

This section is empty.

Jump to

Keyboard shortcuts

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