https://github.com/patte/rust-playground
https://github.com/patte/rust-playground
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/patte/rust-playground
- Owner: patte
- License: gpl-3.0
- Created: 2024-10-08T17:36:10.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-10-09T01:29:25.000Z (8 months ago)
- Last Synced: 2025-03-17T17:08:23.066Z (2 months ago)
- Language: Rust
- Size: 56.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rust playground
Testing out rust features and libraries.
## Run
```bash
cargo run --bin [compress|video_signal|stream_nokhwa|stream_opencv] --release
```## Examples
### lz4 compression
```bash
cargo run --bin compress --releaserandom bytes: 1.3 GB
Allocating...
Took: 82µs 625nsFilling vector with random data...
Took: 63ms 149µs 42nsCompressing data...
Speed: 9.8 GB/s
Took: 126ms 928µs 250nsCalculating sizes...
Took: 792nsOriginal size: 1.3 GB
Compressed size: 4.9 MB
Compression ratio: 0.0039Decompressing and verifying data..
Speed: 4.6 GB/s
Took: 272ms 231µs 166nsOutputting PNG images...
PNG image will contain 125 KB
Creating image of size 1001x1001
Saved uncompressed.png image
PNG image will contain 125 KB
Creating image of size 1001x1001
Saved compressed.png image
Took: 7ms 461µs 292nsTotal execution time: 470ms 129µs 791ns
```
Machine: MacBook Air 2023 M2 24GB