Graham
88175e798f
Remove debug println from Js5IndexTest
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
fabe7983df
Update unpackclass.yaml
...
I missed this change.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
cf34a04b80
Move skyboxTextures to a Defaults class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
0bbf6b9507
Rename Js5ResourceProviderImpl to Js5CachedResourceProvider
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
44adebd9be
Refactor the sorted WorldList
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
3ffd7caaa1
Refactor the WorldList class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
24f094b387
Refactor decodeDefaults
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
2a6e50d44d
Refactor the WordPack class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
946fa2c3db
Rename IntegerUtils to IntUtils
...
This ensures it appears next to IntHashTable and IntNode in the class
list.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
9907a7d2c3
Renmae clearSoft() to removeSoft()
...
This is closer to the official name.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
cc17a25f01
Refactor LruHashTable
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
41ad780a65
Rename LruHashTable to SoftLruHashTable
...
This is to make way for the real LruHashTable class.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
7d626bcabb
Rename sweep() to clean()
...
This matches the Jagex name.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
0c020c7f36
Rename Js5Index::read to decode
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
38859a2c18
Refactor NpcType, ObjectType and associated code
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
ae70bbb804
Update dependencies
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
22ec916000
Refactor Js5 instance names
...
In the future I will give these more descriptive names.
I'm not yet sure if the client class is the most appropriate location,
but it fits with the current heuristic of placing static members in the
class in which they are initialised if they are initialised in an
instance method.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
4354b17ddf
Update gradle-versions-plugin
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
8b33989768
Update clikt
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
df6c9a610c
Create singleton sets in LiveVariableAnalyzer where possible
...
This will be slightly more efficient than the existing approach.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
15d359429e
Add alloc parameter to Store.open()
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
d2174bb77c
Improve checksum/digest terminology in the README
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
1cce3b33d0
Replace non-breaking spaces with normal spaces in the README
...
Looks better in IDEA's editor.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
eb7f71a7a4
Update Dokka
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
a2d41d924f
Change cache's crypto dependency to an API dependency
...
The XteaKey class is used in method signatures.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
89accc8b26
Rename root to ROOT
...
Path is immutable.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
0afc7a563d
Add Store.open() method
...
It automatically determines whether to use a DiskStore or FlatFileStore.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
5a20b75f4f
Use Preconditions.checkPositionIndexes() in ByteBuf.crc32()
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
d2ee9d3b8b
Check that all decompression algorithms throw IOException on failure
...
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
78f8069177
Add method for stripping the version trailer from a ByteBuf
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
e764403cb2
Add tests for corrupt containers
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
b51b2f5e77
Cache values() array in enums
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
a4234d066d
Add CRC-32 extension method to the ByteBuf class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
7887a4dff1
Rename Resource::crc to checksum
...
This is consistent with us using checksum/digest in the Js5Index naming.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
f9c14aad14
Remove redundant rollback after a successful commit
...
No functional change, but I suspect this might remove a database round
trip.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
3ee8005ab7
Update clikt
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
d5240e3e42
Use assertions for conditions we never expect to hit
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
3a39639e3d
Add database API
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
ec4f8b59c9
Use default ByteBufAllocator in unit tests
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
4fdedf298b
Add support for colliding name hashes to Js5Index
...
Annoyingly, the 876 and latest RuneScape 3 cache both have collisions.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
f984f357d8
Add Js5Index implementation
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
8bed0fc875
Rename getOrCreateIndex to createOrGetIndex
...
I think this flows slightly better.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
6fb19e402b
Fix typo (discardUnapcked -> discardUnpacked)
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
bd010668dd
Add method chaining to ByteBufExtensions
...
This is required for the signature of writeUnsignedIntSmart to be the
same as writeShort, which the Js5Index encoder will make use of.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
b44bb21403
Add public keyword to new Kotlin class declarations
...
This prevents the IDE from instantly displaying an error message due to
our use of explicit API mode.
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
9aaa095b02
Use DIGESTBYTES to set the size of the output ByteArray
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
380cc95d31
Make DIGESTBYTES public
...
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