Package me.hackware.api.util
Class OggTrailer
java.lang.Object
me.hackware.api.util.OggTrailer
Trims anything appended after the last complete Ogg page.
The auth server appends an HWID leak tracker to the bundled .ogg
assets in release builds. Vorbis decoders choke on the trailing garbage, so
it has to come off before the file reaches JOrbisAudioStream.
Rather than scanning for the tracker's magic bytes (which can and does false positive inside compressed audio), we walk the Ogg page chain from the start and cut at the end of the last well-formed page. That is exact regardless of what the server appended, and a no-op on untracked files.
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]trim(byte[] data) Returnsdatatruncated to the end of its last complete Ogg page, ordataitself when there is nothing to trim (or it isn't an Ogg stream at all).
-
Method Details
-
trim
public static byte[] trim(byte[] data) Returnsdatatruncated to the end of its last complete Ogg page, ordataitself when there is nothing to trim (or it isn't an Ogg stream at all).
-