Questions tagged [zipoutputstream]

ZipOutputStream is used to write ZipEntrys to the underlying stream. Output from ZipOutputStream can be read using ZipFile or ZipInputStream.

A ZipOutputStream is a mechanism for writing data to a stream in a zip-compressed format. A stream is usually comprised of data to write to a local file, or data being transmitted to a remote server over a network protocol such as HTTP or FTP. As the data is given to the ZipOutputStream, it is compressed, and then transmitted to the stream.

170 questions
0
votes
2 answers

VB.NEt cannot stream/download zip file to client

I have a PDF string list with strings in the form of "http://whatever.pdf" and need to create a zip file of them and stream it to client as a download. The weird thing is if I create the zip (I'm using ZipOutputStream) and write the file to disk it…
Diego Perez
  • 2,188
  • 2
  • 30
  • 58
0
votes
0 answers

VB.Net: Cannot download stream file generated with ZipOutputStream

I'm trying to zip a set of pdf files and send to client as download. No matter what combinations of Response settings I try, the code doesn't throw any exception and apparently the zip file stream is created fine, but the file is not sent to the…
Diego Perez
  • 2,188
  • 2
  • 30
  • 58
0
votes
0 answers

Ktor responding outputStream causing io.netty.handler.timeout.WriteTimeoutException

I have a Ktor application that return multiple files as a stream but when the client has a slow internet connection, apparently, the stream gets full and blows launching an…
ademarizu
  • 845
  • 1
  • 8
  • 18
0
votes
1 answer

When should I call Finish on the ZipOutputStream (SharpZipLib)

SharpZipLib is a .Net implementation for Java library for working with archives. It provides ZipOutputStream class, which derives from DeflaterOutputStream and has Finish() method. In the docs here it is stated that the Finish() method "will write…
Eleonora
  • 3
  • 2
0
votes
1 answer

Android 10 (Android Q): How to unzip file due to External Storage Changes (without android:requestLegacyExternalStorage)

Can the Android 10(Android Q) download the zip file and extract the zip file? I really have no idea. How do I unzip the file without using Environment.getExternalStorageDirectory() without adding this android:requestLegacyExternalStorage="true" in…
0
votes
1 answer

Generate Zip File - download PDF from Url and Generate Zip to Download in Browser - Broken PDF

I have create Rest Service and I am trying to Generate Zip file. This Zip file created from muliple PDF files which are downloaded using method InputStream inpuStream = new URL(url).openStream() . I am able to Generate Zip file Which included PDF…
Jordan
  • 193
  • 3
  • 12
0
votes
1 answer

Java : Unexpected end of ZLIB input stream while attempting to merge split zip files

I have split zip files that I'm trying to merge using Java. But I get Unexpected end of ZLIB input stream error. Any thoughts on what I'm doing wrong? File bigZip = new File("bigZip.zip"); List zipList =…
0
votes
1 answer

Java: Problems with ZipOutputStream and UTF-8 encoding

I am currently having trouble getting a ZipOutputStream to correctly encode xml files in UTF-8 under certain circumstances. Here's the relevant code: public void saveQuest(File selectedFile) { try { ZipOutputStream out =…
0
votes
1 answer

Java zip program produce corrupted zip file

I wanted to write a GUI zip/unzip program with Java. The program will be able to compress any combination of file(s) and directory/ies and decompress one or more compressed files. Now I've just finished the GUI and zip funtion. But the zip funtion…
Michael May
  • 286
  • 2
  • 11
0
votes
1 answer

Corrupt extraction with ZipArchive in PHP

I have a PHP script that must unzip some uploads. The uploads are packed folders, basically zip files with a custom extension. I am having problems with some zip files packed in one machine, but not with the same folder packed in another machine.…
msoutopico
  • 357
  • 3
  • 15
0
votes
1 answer

Unzip Password Protect Zip file is slow, How to make it fast?

I using the following class for UnZip password-protected file but unzipping to too much slow to fast it or any improvement in such class or method. Thanks in advance. Class for Unzip Password Protect Zip file. public class ZipDecryptInputStream…
0
votes
1 answer

Android Create zip file

I am using this piece of code to create a zip file: String filename = Helper.Timestamp() + ".zip"; ZipOutputStream out = Helper.CreateZipOutputStream(filename); Helper.AddZipFolder(out, Helper.ImageFolder); Helper.AddZipFile(out, new…
Seaky
  • 239
  • 2
  • 13
0
votes
1 answer

Java: how to compress a byte[] using ZipOutputStream without intermediate file

Requirement: compress a byte[] to get another byte[] using java.util.zip.ZipOutputStream BUT without using any files on disk or in-memory(like here https://stackoverflow.com/a/18406927/9132186). Is this even possible? All the examples I found online…
0
votes
1 answer

Mac OS Chrome Browser: Archive Utility (Error 1) - Operation not permitted: Unable to expand downloaded zip

Background: We have written a java code to download zip from web location to local download folder. And downloaded zip is expanding fine with Window(including all browser) but we are facing issue in Mac OS with Chrome browser only. Error: Archive…
Manish Bhadani
  • 437
  • 6
  • 13
0
votes
1 answer

Serve Zip of generated Zips to Client

I'm generating a ZIP file that contains a bunch of autogenerated XML files. Recently requirements changed and now i must generate several times that ZIP (with variations on XML data) and serve them directly to client without using actual files in…
Pra3t0r5
  • 75
  • 2
  • 9