Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
github.com/cespare/go-smaz
go-smaz is a pure Go implementation of antirez's smaz, a library for compressing short strings (particularly containing English words).
go get github.com/cespare/go-smaz
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.
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
.
Caleb Spare (cespare). smaz was created by Salvatore Sanfilippo (antirez).
MIT Licensed.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.