Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/utilyre/summer
🔥 High-performance utility for generating checksums in parallel
https://github.com/utilyre/summer
checksum cli command-line cryptography go golang hashing lib library parallel parallel-computing tool utility
Last synced: about 8 hours ago
JSON representation
🔥 High-performance utility for generating checksums in parallel
- Host: GitHub
- URL: https://github.com/utilyre/summer
- Owner: utilyre
- License: apache-2.0
- Created: 2023-08-09T13:04:41.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-15T10:34:56.000Z (about 2 months ago)
- Last Synced: 2024-09-15T12:56:13.379Z (about 2 months ago)
- Topics: checksum, cli, command-line, cryptography, go, golang, hashing, lib, library, parallel, parallel-computing, tool, utility
- Language: Go
- Homepage: https://pkg.go.dev/github.com/utilyre/summer
- Size: 98.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Installation
- [Latest Release](https://github.com/utilyre/summer/releases/latest)
- Manual
```bash
go install github.com/utilyre/summer/cmd/summer@latest
```## Usage
For starters, you can run the `generate` command on any file:
```
$ summer generate foo bar
764efa883dda1e11db47671c4a3bbd9e foo
081ecc5e6dd6ba0d150fc4bc0e62ec50 bar
```Add the `-r` flag to generate checksums for directories recursively:
```
$ summer generate -r bar nested
081ecc5e6dd6ba0d150fc4bc0e62ec50 bar
168065a0236e2e64c9c6cdd086c55f63 nested/baz
```To utilize more cores of your CPU, pass `--read-jobs=n` and `--digest-jobs=m`
flags, where `n` and `m` are the number of jobs used for each task respectively.Run `summer help generate` to learn more about different flags.
## Testing
```bash
go test -v ./...
```## API
It is possible to call the API of this utility directly in your own
application. Here's an example:```go
package mainimport (
"context"
"log""github.com/utilyre/summer/pkg/summer"
)func main() {
results, err := summer.Sum(context.TODO(), []string{"file.txt"})
if err != nil {
log.Fatal(err)
}for result := range results {
if result.Err != nil {
log.Println(result.Err)
continue
}// TODO
}
}
```