sharkdp / hexyl

A command-line hex viewer
Apache License 2.0
8.92k stars 227 forks source link

feat(lib): skip forward when relative forward seeks are specified on non-seekable streams #93

Closed ErichDonGubler closed 4 years ago

ErichDonGubler commented 4 years ago

An example use case: this will allow the binary to have --seek Just Work™ for stdin (see #95 for this being implemented). This has been separated out since I think this change will be relatively uncontroversial, while the changes in #95 might be more so.

This is technically a breaking change, since the data and behavior of Input is exposed publicly. However, it seems unlikely to me that clients actually depended on a failure in the case that's being changed.

sharkdp commented 4 years ago

95 looks great, so I'm not going to review this separately (also, it looks like the changed error messages in here do not really make sense without #95, but I'm not completely sure). Hope that's fine with you.

ErichDonGubler commented 4 years ago

Perfect, exactly the sort of outcome I was hoping for. :)