zip_add with custom non-seekable zip_source_t #556
|
Is this possible? My use case: I already have the streaming encryption working.
Can I use this streaming encryption to write the encrypted data to a zip file? |
Replies: 1 comment 1 reply
|
Yes, you can wrap your streaming encryption via For Unfortunately we don't have a good example for creating a custom source yet, but by looking at the documentation and source code, you should be able to figure it out. If you have questions, feel free to follow up here. |
Yes, you can wrap your streaming encryption via
zip_source_function()and use this source to add it to the archive. You will need to implement the commandsZIP_SOURCE_OPEN,ZIP_SOURCE_READ,ZIP_SOURCE_CLOSE,ZIP_SOURCE_STAT,ZIP_SOURCE_ERROR, andZIP_SOURCE_FREE.For
ZIP_SOURCE_STAT, you can simply return 0 if you don't want to provide any information.Unfortunately we don't have a good example for creating a custom source yet, but by looking at the documentation and source code, you should be able to figure it out. If you have questions, feel free to follow up here.