Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ybirader committed Sep 24, 2023
1 parent 1c89f29 commit a600225
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ pzip, short for parallel-zip, is a blazing fast concurrent zip archiver and extr
### Command Line

For command-line usage, we provide two binaries which can be installed separately:
- pzip- concurrent zip archiving
- punzip- concurrent zip extraction
- **pzip-** concurrent zip archiving
- **punzip-** concurrent zip extraction

To install, run:

### macOS

For zip archiving: `brew install ybirader/pzip/pzip`

For zip extraction: `brew install ybirader/pzip/punzip`

#### Debian, Ubuntu, Raspbian
Expand Down
8 changes: 4 additions & 4 deletions extractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func NewExtractor(outputDir string, options ...extractorOption) (*extractor, err
return nil
}

fileWorkerPool, err := pool.NewFileWorkerPool(fileExecutor, &pool.Config{Concurrency: e.concurrency, Capacity: 1000})
fileWorkerPool, err := pool.NewFileWorkerPool(fileExecutor, &pool.Config{Concurrency: e.concurrency, Capacity: 10})
if err != nil {
return nil, derrors.Wrap(err, "ERROR: could not create new file worker pool")
}
Expand Down Expand Up @@ -106,15 +106,15 @@ func (e *extractor) extractFile(file *zip.File) (err error) {
err = errors.Join(err, outputFile.Close())
}()

fileContent, err := file.Open()
srcFile, err := file.Open()
if err != nil {
return derrors.Errorf("ERROR: could not open file %s", file.Name)
}
defer func() {
err = errors.Join(err, fileContent.Close())
err = errors.Join(err, srcFile.Close())
}()

_, err = io.Copy(outputFile, fileContent)
_, err = io.Copy(outputFile, srcFile)
if err != nil {
return derrors.Errorf("ERROR: could not decompress file %s", file.Name)
}
Expand Down

0 comments on commit a600225

Please sign in to comment.