Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET Real Time Zip — getting compressed item size during zip operation

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #20093 |

    I couldn’t find it in the class reference, so I’m guessing it isn’t supported, but I thought I’d ask to be sure:  When using Real Time Zip to zip up several files into a single zip file is it possible to get the compressed size at the time the data descriptor is being written for each item?  I’d like to be able to get that info without having to re-open the file and read it from the central directory at the end of the whole process.

    Also, what triggers writing the data descriptor fields?  I understand that the data descriptor is written for the last zip entry when ZipWriter.CloseZipFile is called, but I don’t see how it happens for the entries preceding that. 



    Imported from legacy forums. Posted by Steve (had 1962 views)

    User (Old forums)
    Post count: 23064

    Unfortunately this feature is not supported.

    As for writing the Data Descriptor, writing the next ItemData will trigger it.  Here is an excerpt from the help documentation :

    “Once an item’s data has been written, calling WriteItemLocalHeader with the header for the next item automatically causes the data descriptor (green boxes) of the previous item to be written.”

    In fact, this help topic explains well how the process works, and provides a code snippet :



    Imported from legacy forums. Posted by André (had 2535 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.