Comments (5)
I have slightly unrelated question: what have you used to create your ZIP file?
from swcompression.
I have slightly unrelated question: what have you used to create your ZIP file?
I used the Finder to create. (that right-click
btw just be clear, GitHub does not allow me to upload .bz2 file directly so I uploaded a zip of that bz2
from swcompression.
Your ZIP file actually helped me uncover an interesting issue. Apparently, Finder, or whatever it is using under the hood, produces ZIP files which don't strictly conform to ZIP specifications (Extended Timestamp Extra Field in the Central Directory must only contain modification time, but Finder also puts there access time and creation time). What's even more interesting is that Finder in my version of macOS produces correct ZIP files.
Currently, SWCompression crashes when trying to open such incorrect ZIP files. While I think that this is, generally, an issue on Finder's part and should be fixed by Apple, at the same time SWCompression probably shouldn't crash when it encounters these ZIP files. I am going to fix this particular issue in the near future.
Anyway, back to your original question. I was unable to reproduce the problem you've encountered: on my pretty old machine (Macbook Pro Late 2011) with macOS 10.13 and Swift 5.0.3 it took SWCompression (built in Release mode) less than 2 seconds to decompress your BZip2 file. Which leads me to the following questions:
-
Are you building SWCompression in Debug or Release mode? Please note, that the optimizations Swift compiler does in Release mode dramatically improve the performance of SWCompression.
-
What Swift version are you using?
from swcompression.
Are you building SWCompression in Debug or Release mode?
Currently debut mode. I will pay attention to this tricky switch next time.
What Swift version are you using?
Swift 5.1? I used latest Xcode with it’s SDKs.
———
Currently, debug sessions are reporting decode times from 30s to 350s floating between them while other files with same type can do a pretty job. I still having no idea why this is happening. I’ll follow up this post when I got some idea.
———
Your ZIP file actually helped me uncover an interesting issue
The zip file format was badly played by coders around the world, fact is that command line such as unzip (usually from apt or home brew) cannot handle all of them. There are always zip files with extra info attached to or with illegal byte sequence. ! Been a headache over years 🤦♂️
from swcompression.
This bug is gone silently in release mode.
from swcompression.
Related Issues (20)
- Progress when decompression is needed HOT 1
- Memory issues when working with larger files HOT 8
- [CRASH] MsbBitReader.bit() HOT 4
- AR Format Support HOT 7
- Can Gzip unarchive return Member? HOT 1
- GzipArchive.unarchive wrongMagic for short data HOT 1
- Brotli Support? HOT 2
- Symlinks in tarballs are created with absolute paths HOT 3
- BZip2Error.wrongCRC when decompressing HOT 2
- Support File I/O for large archives and resource-constrained environments
- Error when decompressing a certain 7z file HOT 2
- Some zip files can't be extracted HOT 2
- LZ4 format not compatible? HOT 8
- Compiling for watchOS fails HOT 1
- LZ4 decompress speed HOT 10
- Support splitting zips into multiple files
- Is there a way to extract a single file from a 7z compressed archive? HOT 4
- LZFSE Support
- Please update BitByteData dependency HOT 6
- Crash during GzipArchive.unarchive
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swcompression.