https://github.com/blacktop/lzss
LZSS compression package for Go.
https://github.com/blacktop/lzss
compression golang golang-package lzss
Last synced: 2 months ago
JSON representation
LZSS compression package for Go.
- Host: GitHub
- URL: https://github.com/blacktop/lzss
- Owner: blacktop
- License: mit
- Created: 2018-10-14T15:54:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-12T17:04:29.000Z (about 5 years ago)
- Last Synced: 2025-03-30T00:05:34.060Z (3 months ago)
- Topics: compression, golang, golang-package, lzss
- Language: C
- Size: 50.8 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lzss
[](https://pkg.go.dev/github.com/blacktop/lzss) [](http://doge.mit-license.org)
> LZSS compression package for Go.
---
## Install
```bash
go get github.com/blacktop/lzss
```## Examples
```golang
import (
"io/ioutil"
"log""github.com/blacktop/lzss"
"github.com/pkg/errors"
)func main() {
dat, err := ioutil.ReadFile("compressed.bin")
if err != nil {
log.Fatal(errors.Wrap(err, "failed to read compressed file"))
}decompressed := lzss.Decompress(dat)
err = ioutil.WriteFile("compressed.bin.decompressed", decompressed, 0644)
if err != nil {
log.Fatal(errors.Wrap(err, "failed to decompress file"))
}
}
```> **NOTE:** I believe lzss expects the data to be word aligned.
## Credit
Converted to Golang from `BootX-81//bootx.tproj/sl.subproj/lzss.c`
## TODO
- [ ] add Compress func
## License
MIT Copyright (c) 2018 blacktop