sociomantic-tsunami / ocean

General purpose, platform-dependent, high-performance library for D
Other
61 stars 56 forks source link

Introduce ZipStreamDecompressor, to support streaming of PKZIP files #796

Closed don-clugston-sociomantic closed 4 years ago

don-clugston-sociomantic commented 4 years ago

The existing ZlibStreamDecompressor supports streaming of gzip files. This module extends that class to also support streamable pkzip files. User code does not need to know if it is processing a gzip or a pkzip archive; they are treated identically.

Streaming of PKZIP files isn't actually possible, but this module does it anyway :smile:

In practice it works for pretty much any zip file that has only a single file inside it. The weakness of the pkzip format is that it is not possible to know if you have a pathological case until you have received the entire archive. So if faced with a pathological case, it will just throw an exception.

codecov[bot] commented 4 years ago

Codecov Report

Merging #796 into v5.3.x will increase coverage by 0.04%. The diff coverage is 83.51%.

ben-palmer-sociomantic commented 4 years ago

Should this target v5.x.x?

don-clugston-sociomantic commented 4 years ago

Should this target v5.x.x?

Dunno. The problem is, there is an important commit in v5.3.x which isn't in v5.x.x. I don't know which of these branches is actually the head.

ben-palmer-sociomantic commented 4 years ago

Dunno. The problem is, there is an important commit in v5.3.x which isn't in v5.x.x. I don't know which of these branches is actually the head.

Oops, that was a mistake that should now be fixed.

don-clugston-sociomantic commented 4 years ago

Changed to v5.x.x, now that the branches have been harmonised.

stefan-koch-sociomantic commented 4 years ago

This looks good to me!