Skip to content

Comments

WIP: Demonstrate that pre-1504 keys are restored for large video files#1124

Closed
bertm wants to merge 5 commits intohyphanet:nextfrom
bertm:restore-pre-1504-chks
Closed

WIP: Demonstrate that pre-1504 keys are restored for large video files#1124
bertm wants to merge 5 commits intohyphanet:nextfrom
bertm:restore-pre-1504-chks

Conversation

@bertm
Copy link
Contributor

@bertm bertm commented Feb 14, 2026

No description provided.

Bombe and others added 5 commits February 13, 2026 21:08
This way it can be mocked in tests.
The InputStream.skip() method is _not_ required to skip as many bytes as
specified, or skip as many as it can, or actually skip any bytes at all;
“return 0;” is a 100% valid implementation. It also is not required to actually
_read_ the input stream; if e.g. `seek()`-type functionality is available, it
may be used to not read anything at all but simply skip (hence the name!) to
the desired offset in the stream.

As the MultiHashInputStream changed its superclass from InputStream to
SkipShieldingInputStream, its implementation of skip() changed, too:
InputStream’s skip() actually tries to read() as many bytes as specified, only
ending prematurely if the stream EOFs. SkipShieldingInputStream’s skip(),
however, only reads up to 8k of data — which is rather questionable, but okay.

Both implementations correctly return the number of bytes they skipped, and so,
while it can be argued that MultiHashInputStream’s skip() implementation has
changed its observable behaviour and should be fixed, it is in fact the _usage_
of the skip method in the InsertCompressor which is beyond any doubt incorrect.
This pull request fixes the usage.
@ArneBab
Copy link
Contributor

ArneBab commented Feb 15, 2026

Thank you! I’m closing to avoid accidental merging.

@ArneBab ArneBab closed this Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants