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
Graham
415363fbbe
Pass --delete to rsync
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
434960eeec
Add KDoc link to the README
...
This commit also renames "Community" to "Links", as that title better
reflects the new set of links.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
fceab7ee1e
Remove dokkaHtmlCollector from the build task
...
Gradle seems to re-run this every time, so Drone ended up building the
KDoc twice (once in the build stage and again in the publish stage).
Removing it from the build stage ensures Drone only builds KDoc once.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
a235167b89
Publish KDoc to docs.openrs2.dev
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
06106938af
Replace project.rootDir with rootDir
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
2520798ccf
Move commitHash() to the bottom of build.gradle.kts
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
8cbf973f50
Update Dokka to 1.4.0-rc
...
The output is significantly nicer.
External documentation links don't seem to work correctly at the moment,
so I have commented those out for now.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
d8f98c1bf5
Update data file availability point in the FAQ
...
I'm not yet convinced we have all the files - I've since realised the
"complete" 550 cache floating around is probably modified and includes
some files from a later revision.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
7ab567b7b9
Optimise DiskStore::list
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
6314f3625a
Add ByteBuf extension methods for reading/writing smarts
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
4b1c6c7cb7
Rename Smart to ShortSmart
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
192d5b9e8d
Resolve inspections
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
b2a7464da2
Use Kotlin's new ArrayDeque class
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
ab642f300d
Remove explicit stdlib dependency
...
Kotlin now adds this dependency implicitly.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
1455379f20
Document thread safety of DiskStore and FlatFileStore
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
20d6d73d30
Check {read,write}BufferSize are both zero or positive
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
5e447f31d6
Free readBuffer if the writeBuffer allocation fails
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
8cdd33a1dd
Replace exists() with isDirectory() for consistency
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
3f8e1a1951
Add FlatFileStoreTest
...
This commit fixes some bugs in FlatFileStore at the same time.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago