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
Graham
8c93b4623d
Format .editorconfig
...
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
ed2a3f6dc6
Update Kotlin
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
0546e05183
Update kotlinter/ktlint
...
Annoyingly, this requires us to disable a different set of rules to work
around a different bug!
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
9f1b2dbc29
Add BufferedFileChannel
...
Similar to the equivalent class in the client.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
1e1711820d
Rename actualSeq to actualBlockNum
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
440e59ee00
Update Gradle
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
2dda87fa4a
Improve testListGroups()
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
ad5f714982
Add testBounds() to DiskStoreTest
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
9de0b26da4
Throw exception in remove() if group ID is negative
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
63a8f5534e
Add netty-buffer API dependency to the cache module
...
The public interface of the cache module uses ByteBufs.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
ada90fb027
Add DiskStore tests
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
e8e2460d8e
Rename getDelta to getDuration
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
c634d2e4d7
Rename seq to blockNum
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
cea016d4ef
Add low-level cache interface
...
Unit tests to follow - I've been working on these classes for a few days
now, so I wanted to make sure they get backed up in the repository.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
cec68723a4
Add Cp1252Charset contains test
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
eef8fc1f0c
Improve Cp1252Charset.contains()
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
2525501901
Add ModifiedUtf8Charset
...
Will be used by the packclass implementation. Like Cp1252Charset, the
JDK isn't guaranteed to provide an implementation of this charset.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
7ab3b3d335
Add method for calculating the K&R hash code of a CP-1252-encoded string
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
be7cc9ac8a
Add Cp1252Charset
...
Slightly different to the standard implementation, as like the client it
considers NUL to be an unmappable character. (Furthermore, the standard
implementation isn't in StandardCharsets.)
It also provides fast methods for encoding/decoding a single byte/char
at a time.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
e7ad4b92ff
Group test files by test
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
7179743f5d
Add fsync() extension method
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
ef02a687c9
Update fastutil
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
0f032e4f21
Update to Gradle 6.6
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
c21702a0d5
Refactor the insertBefore method
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
c3d7e9d081
Add reference counting documentation
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
d801e5fda6
Re-use length variables in the Js5Compression code
4 years ago
Graham
db3421418c
Fix prefetch/len local names in Js5NetQueue
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
24db41a74e
Add gzip headers to containers
...
The headerless gzip compression is only used for pack200 files, not
containers.
Signed-off-by: Graham <gpe@openrs2.dev>
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
8887b0a1e9
Refactor the crc32 method
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
3f59e1764c
Store individual XteaKey components separately
...
This allows us to make them private (rather than internal) and the type
as a whole is immutable.
It does mean we need to convert the key to an IntArray every time we use
it now. However, I hope that the JVM will be smart enough to inline the
toIntArray() method and also smart enough to realise it doesn't escape,
allowing it to allocate it on the stack rather than the heap.
This commit also adds methods for converting XteaKeys to hex, and
converting from hex/integer arrays to an XteaKey object.
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
Graham
f81f4a81c7
Set LzmaCommand's default level to -6
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
921ef3a08f
Refactor some of the client loading code
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
10a99fc9fb
Refactor most of the preferences code
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago