First, the zip archive constructed from the audio files doesn't need to be compressed, since the audio files themselves are compressed. Compressing each file is slow, whereas simply storing it would be faster.
Second, the construction of the zip archive does not operate in a nicely bounded amount of space. Ideally, we would want the space usage of the archival process to be constant. I think that we can get it to operate in constant space, since the CRC32 checksum of the files can be computed in constant space by streaming the file into the checksum function, and the file can be read again when it is to be written into the archive, uncompressed. Both of those operations run in constant space, so overall it should run in constant space. This probably means that the zip-archive library is doing something silly.
First, the zip archive constructed from the audio files doesn't need to be compressed, since the audio files themselves are compressed. Compressing each file is slow, whereas simply storing it would be faster.
Second, the construction of the zip archive does not operate in a nicely bounded amount of space. Ideally, we would want the space usage of the archival process to be constant. I think that we can get it to operate in constant space, since the CRC32 checksum of the files can be computed in constant space by streaming the file into the checksum function, and the file can be read again when it is to be written into the archive, uncompressed. Both of those operations run in constant space, so overall it should run in constant space. This probably means that the zip-archive library is doing something silly.