https://github.com/hymkor/uncozip
UNzip COrrupted ZIP file that does not have the central directory records.
https://github.com/hymkor/uncozip
golang salvage solva unzip zip
Last synced: 18 days ago
JSON representation
UNzip COrrupted ZIP file that does not have the central directory records.
- Host: GitHub
- URL: https://github.com/hymkor/uncozip
- Owner: hymkor
- License: mit
- Created: 2023-01-13T18:52:44.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-19T00:58:57.000Z (about 1 year ago)
- Last Synced: 2025-04-10T22:53:11.520Z (18 days ago)
- Topics: golang, salvage, solva, unzip, zip
- Language: Go
- Homepage: https://pkg.go.dev/github.com/hymkor/uncozip
- Size: 147 KB
- Stars: 13
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://pkg.go.dev/github.com/hymkor/uncozip)
uncozip
=======This is a command and package to UNzip COrrupted ZIP file that does not have the central directory records.
Even when the archive is so large that `zip -FF Corrupted.zip --out New.zip` fails, sometimes uncozip succeeds.
( For example, the case Corrupted.zip is larger than 4GB )The uncozip is also useful on non-Windows OSes to unpack archives with non-UTF8 filenames such as Shift_JIS.
(`uncozip -decode Shift_JIS foo.zip`)Usage
-----```
uncozip {OPTIONS} ZIPFILENAME [list...]uncozip {OPTIONS} - [list...] < ZIPFILENAME
uncozip {OPTIONS} < ZIPFILENAME
```* `-d string` the directory where to extract
* `-debug` Enable debug output
* `-strict` quit immediately on CRC-Error
* `-t` Test CRC32 only
* `-decode IANA-NAME` specify [IANA-registered-name][iana] to decode filename when UTF8 flag is not set (for example: `-decode Shift_JIS`)[iana]: https://www.iana.org/assignments/character-sets/character-sets.xhtml
Install
-------Download the binary package from [Releases](https://github.com/hymkor/uncozip/releases) and extract the executable.
### for scoop-installer
```
scoop install https://raw.githubusercontent.com/hymkor/uncozip/master/uncozip.json
```or
```
scoop bucket add hymkor https://github.com/hymkor/scoop-bucket
scoop install uncozip
```package "github.com/hymkor/uncozip"
===================================Unlike "[archive/zip]", uncozip can
- read an archive from io.Reader.
( "[archive/zip]" requires archive's filename[^zip.OpenReader] or io.ReaderAt and size information[^zip.NewReader] )
- handle encrypted archive.
( You have to call [RegisterPasswordHandler] )
- decode filename from any encoding
( You have to call [RegisterNameDecoder] )[archive/zip]: https://pkg.go.dev/archive/zip
[RegisterPasswordHandler]: https://pkg.go.dev/github.com/hymkor/uncozip#CorruptedZip.RegisterPasswordHandler
[RegisterNameDecoder]: https://pkg.go.dev/github.com/hymkor/uncozip#CorruptedZip.RegisterNameDecoder
[^zip.OpenReader]: See also https://pkg.go.dev/archive/zip#OpenReader
[^zip.NewReader]: See also https://pkg.go.dev/archive/zip#NewReader[Reference](https://pkg.go.dev/github.com/hymkor/uncozip)