Graham
ba75306169
Annotate cache methods with default parameters with @JvmOverloads
...
This allows them to be used from Java.
Signed-off-by: Graham <gpe@openrs2.org>
2 years ago
Graham
1a78ef3c7d
Throw an exception if header is truncated
...
Signed-off-by: Graham <gpe@openrs2.org>
2 years ago
Graham
75d4446b92
Ensure uncompressIfKeyValid always consumes the entire container
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
416dabec4c
Include empty loc groups in the total number of known keys
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
e8fd432f14
Combine key validation with uncompression
...
As key validation has to uncompress the data anyway to confirm the key
is valid, it seems silly to uncompress twice given everywhere we
performed key validation immediately uncompressed the container
afterwards.
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
0016b8ab7d
Replace AssertionError with IllegalStateException
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
36e4fa474b
Fix comment
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
f143eef142
Move Kotlin files from src/{main,test}/java to src/{main,test}/kotlin
...
Signed-off-by: Graham <gpe@openrs2.org>
4 years ago
Graham
ce5b76ef0f
Rename dev.openrs2 package to org.openrs2
...
Signed-off-by: Graham <gpe@openrs2.org>
4 years ago
Graham
977dd0bd93
Check that we read exactly uncompressedLen bytes
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
107c432e65
Rename NONE to UNCOMPRESSED
...
This is the name used by Jagex.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
8d35b5010a
Add functions for quickly checking if a XTEA key is valid
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
0d384fa8f2
Throw IOException for all JS5 decompression errors
...
Should be nicer than the mixture of exception types we used before.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
0af11d75c3
Add flag to disable encryption of uncompressed containers by default
...
These don't work in the 550 client due to a bug.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
e5e9ece098
Fix JS5 uncompression of large GZIP-compressed files
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
232ba32bbd
Enable explicit API mode
...
This already caught some cases of public members that should have been
private and one case where the inferred type was too specific.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
d801e5fda6
Re-use length variables in the Js5Compression code
4 years ago
Graham
ce97775663
Reduce use of ByteBuf{Input,Output}Stream in Js5Compression
...
Probably slightly more efficient.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
58335ca6d0
Add JS5 compression/encryption implementation
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago