Comments (3)
It wasn't an explicit design goal, but I guess it indeed only works with objects in memory. However, files (even the big ones) in any case should eventually be loaded into memory to work with them.
What exactly are you suggesting should be done instead?
from swcompression.
OK, I see.
I think, there are two questions being asked:
-
The ability to interact with files on the filesystem directly. This functionality is not present by design, since SWCompression is intended to be abstract over the source of the data.
-
The ability to process data in the streaming manner while still not being tied to the actual source. This, on the other hand, is a reasonable feature to have, which should allow to do what you're suggesting (don't keep all the data in memory).
I considered the second issue at various points in time, and I think it can be resolved, for example, by providing APIs that take Foundation's InputStream
or maybe even FileHandle
as an input argument. However, at this point this is all purely theoretical speculations, so I am not even completely sure if it will work in the intended way.
So, to summarize, I guess there are some plans to try to do something along the lines of what you want, but I can't say when it will happen.
from swcompression.
Read only part of data that you needs at current moment
All ready data remove from memory or save immediately to disk
I say about something like this:
https://stackoverflow.com/questions/63237807/does-ziparchive-load-entire-zip-file-into-memory
https://referencesource.microsoft.com/#WindowsBase/Base/MS/Internal/IO/Zip/ZipArchive.cs,040dfbf7c78aba7a
from swcompression.
Related Issues (20)
- [CRASH] LittleEndianByteReader.swift:33:20 HOT 2
- 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
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.