go-smaz

A pure Go implementation of the smaz compression library for short strings.

  • Owner: cespare/go-smaz
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

go-smaz

GoDoc

go-smaz is a pure Go implementation of antirez's
smaz, a library for compressing short strings (particularly containing
English words).

Installation

$ go get github.com/cespare/go-smaz

Usage

import (
  "github.com/cespare/go-smaz"
)

func main() {
  s := "Now is the time for all good men to come to the aid of the party."
  compressed := smaz.Compress([]byte(s))           // type is []byte
  decompressed, err := smaz.Decompress(compressed) // type is []byte; string(decompressed) == s
  if err != nil {
    ...
}

Also see the API documentation.

Notes

go-smaz is not a direct port of the C version. It is not guaranteed that the output of smaz.Compress will be
precisely the same as the C library. However, the output should be decompressible by the C library, and the
output of the C library should be decompressible by smaz.Decompress.

Author

Caleb Spare (cespare). smaz was created by Salvatore Sanfilippo
(antirez).

Contributors

License

MIT Licensed.

Other implementations

Main metrics

Overview
Name With Ownercespare/go-smaz
Primary LanguageGo
Program languageGo (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2012-09-12 10:02:20
Pushed At2022-09-05 16:39:37
Last Commit At
Release Count1
Last Release Namev1.0.0 (Posted on 2021-09-01 00:17:46)
First Release Namev1.0.0 (Posted on 2021-09-01 00:17:46)
用户参与
Stargazers Count80
Watchers Count3
Fork Count18
Commits Count21
Has Issues Enabled
Issues Count6
Issue Open Count0
Pull Requests Count1
Pull Requests Open Count1
Pull Requests Close Count1
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private