User | Kudos |
---|---|
6 | |
6 | |
3 | |
2 | |
2 |
Having a complete API for zip file
Currently it has :
- New zip file
- Add a file to zip file
- Close zip file and add a comment
- unzip the zip file to a folder
This API is not quite complete.
Example of use of ZIP files: In a data streaming application, you want to make an archive of recordings files. The data files average 500 MB Once compressed, they do more substantive than 50MB. You create an interface to assist the user in steps of compression. Once compressed, you want to propose an interface for retrieving compressed recordings.
The ideal is to list the files and clarify some information, such as track number, recording time and a few other indicators related to data.
But to do that, we 'could' use two ways:
- The properties of the zip file.
- An additional file that would read that to see them.
Several problems arise:
- It is not possible to read the commentary added with the close function.
- It is not possible to edit the commentary added with the close function.
- It is not possible to decompress a single file.
In the example, if we unpack all files to read properties, it'll take time and a lot of CPU resources.
It would require full management functions:
- New file
- Close file
- Add a comment
- Read the comment
- Erase the comment
- Add a file
- Delete a file
- List all file (with or without a mask)
- Uncompress a zipped file to disk
- Uncompress a zipped file to memory
- compress and uncompress a string in memory (usefull to optimise the network data flow)
In the ideal case, a zip file should be considered a folder. So we have all classical file functionality to manage it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.