https://github.com/jedbrooke/pjzip
Parallel Java Gzip compressor
https://github.com/jedbrooke/pjzip
gzip java parallel
Last synced: 3 months ago
JSON representation
Parallel Java Gzip compressor
- Host: GitHub
- URL: https://github.com/jedbrooke/pjzip
- Owner: jedbrooke
- License: mit
- Created: 2022-06-21T17:28:43.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-06-22T00:29:34.000Z (over 3 years ago)
- Last Synced: 2025-01-19T13:50:03.634Z (about 1 year ago)
- Topics: gzip, java, parallel
- Language: Java
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PJzip
Parallel Java Gzip compressor
## Usage:
build with maven:
```
mvn compile package
```
run:
PJzip takes in data from stdin and writes the compressed stream to stdout
select number of threads with `-p` arg (default all threads)
```
cat file | java -jar target/pjzip-0.1.0.jar > file.gz
```
check file:
```
gzip -tv file.gz
#should output:
#file.gz: OK
```
`file.gz` can be unzipped by any tool that supports standard gzip
```
gunzip file.gz
```
## Architecture
PJzip uses a producer-consumer multithreading model. A producer will read in chunks from stdin and send them as block to a queue, where worker threads will consume the blocks and compress the data and send them to the output queue. The blocks are then written to stdout.