Equivalent to the built-in GZIPOutputStream, except it produces output
that is bit-for-bit identical to Jagex's implementation.
Signed-off-by: Graham <gpe@openrs2.org>
There were two problems:
- The current intention is for the uncompressed array to be 1 byte long,
not 6 bytes - as map groups only have a single file, we don't need the
group header.
- The comment was out of the sync with the intended code (replace
uncompressed with a single element byte array containing zero).
Signed-off-by: Graham <gpe@openrs2.org>
It removes the archive/group prefix and the 0xFF markers.
Unfortunately using Js5ResponseDecoder here is tricky - perhaps it
could've been done with an EmbeddedChannel.
Signed-off-by: Graham <gpe@openrs2.org>
Not really used for anything yet, but Gradle moans because
xtea-plugin/src/test/ exists and it can't find the JUnit engine.
Signed-off-by: Graham <gpe@openrs2.org>
If the future is not successful the channel may have been closed. The
pipeline of a closed channel is empty, so attempting to remove handlers
from it would cause an exception.
Signed-off-by: Graham <gpe@openrs2.org>
The API endpoint isn't always updated immediately, so this is useful for
gathering keys semi-manually if they're needed more urgently.
Signed-off-by: Graham <gpe@openrs2.org>
Keys are now initially imported into a key_queue table, which is never
locked exclusively - allowing the API endpoint to function while the
brute forcer is running. The brute forcer moves all pending keys in the
queue to the keys table before running the actual brute forcing.
Signed-off-by: Graham <gpe@openrs2.org>
In some cases the capacity would be one byte greater than necessary.
I've added a comment explaining why the calculation works and a unit
test that ensures it is calculated correctly for all lengths between 1
and 511*3+1 bytes.
Signed-off-by: Graham <gpe@openrs2.org>