#89 ZipReader#read(byte[]...)

Closed
opened 4 years ago by ranides · 2 comments
ranides commented 4 years ago

Probably we will miscalculate number of bytes if signature is partially read

Anyway, we read data byte-by-byte, which is not effective.

We should skip prefix (if necessary), put signature (unread part), then invoke ordinary bulk read with modified offset and limit.

Probably we will miscalculate number of bytes if signature is partially read Anyway, we read data byte-by-byte, which is not effective. We should skip prefix (if necessary), put signature (unread part), then invoke ordinary bulk read with modified offset and limit.
ranides commented 3 years ago
Owner

We skip prefix before signature using buffered read. We calculate correctly number of bytes.

We skip prefix before signature using buffered read. We calculate correctly number of bytes.
ranides referenced this issue from a commit 3 years ago
ranides commented 3 years ago
Owner

Tests are done "naturally", our PackageScanner uses ZipReader internally. PackageScanner is tested both explicitly and implicitly (by ContractTesters).

Tests are done "naturally", our PackageScanner uses ZipReader internally. PackageScanner is tested both explicitly and implicitly (by ContractTesters).
Sign in to join this conversation.
No Milestone
No assignee
1 Participants
Loading...
Cancel
Save
There is no content yet.