Closed AlexTMjugador closed 1 week ago
This PR also bumps the MSRV to 1.61 to fix CI checks, as it is required for the current code to work anyway (the screenshot below is from cargo msrv
):
Thanks for the quick review and merge! :rocket:
I was wondering if there are any plans to publish a release with these changes soon? I'd love to try them out on a new OptiVorbis release too, but no worries if we have to wait a little longer 😉
These changes make the Ogg page CRC verification check toggleable at runtime by end-users via a new
PageParsingOptions
struct that may be passed at reader/parser construction time. I have paid special attention to making the new feature both backwards and forwards compatible, which led me to taking the following design choices:PageParsingOptions
struct must use the new*_with_parse_opts
methods.PageParsingOptions
as#[non_exhaustive]
, so that we may add new public fields to it in the future without a semver-breaking change. Users must always default-initialize this struct. It only derivesClone
too, in case we ever need to make it hold non-Copy
types.PageParsingOptions
between different reader structs is achieved throughArc
s, which ensures that no struct stops beingSend
orSync
with a negligble performance impact.The
fuzzing
cfg flag is still honored after these changes by using it to set a default value for the newverify_checksum
page parsing option accordingly.The need for these changes has been brought forward in https://github.com/OptiVorbis/OptiVorbis/issues/101.