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
7179743f5d
Add fsync() extension method
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
c3715d7320
Add useTempFile extension methods
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
8370ad104e
Write files atomically
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
eef6d31753
Replace org.junit.jupiter.api.Test with kotlin.test.Test
...
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
ccf7056a93
Use private companion objects where possible
...
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
0206bbd4b2
Set DeterministicJarOutputStream's default compression level to 9
...
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
8685d2b2dc
Remove unused DeterministicJarOutputStream methods
...
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
10145fdb43
Add Sequence<JarEntry> extension property to JarInputStream
...
This improves the readability of code that iterates through all entries
in a jar.
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Scu11
26348b8a2e
Move Library#write methods to dedicated classes
...
Signed-off-by: Scu11 <scu11@openrs2.dev>
5 years ago
Graham
9a1c0e9caf
Add DeterministicJarOutputStreamTest
...
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
958fbc03ba
Add IterableUtilsTest
...
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
972d3cebc1
Add ForestDisjointSetTest
...
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
1c539f22fe
Add DisjointSet and ForestDisjointSet documentation
...
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
54aa9b738c
Add testFlush() to SkipOutputStreamTest
...
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
fced5610a5
Add SkipOutputStreamTest
5 years ago
Graham
09f17d246b
Add additional removeFirst() variants to IterableUtils
...
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
465078256f
Rename common module to util again
...
As I'm splitting it up into smaller modules (e.g. compress and crypto) I
think util is a more appropriate name for the remainder.
Signed-off-by: Graham <gpe@openrs2.dev>
5 years ago
Graham
e05653cdcc
Rename util to common
5 years ago
Graham
b25f3c0c58
Convert ForestDisjointSet to Kotlin
5 years ago
Graham
7a0f94dbde
Convert elements and partitions to properties
5 years ago
Graham
c0836e11f6
Convert DisjointSet to Kotlin
5 years ago
Graham
429867e3af
Convert SkipOutputStream to Kotlin
...
This commit also changes the skipBytes logic slightly to avoid the need
to modify the off/len arguments, which is not possible in Kotlin.
5 years ago
Graham
caaa53095d
Convert DeterministicJarOutputStream to Kotlin
5 years ago
Graham
72db700534
Remove capitalize() method
...
Kotlin already has a capitalize() method - we don't need to define our
own.
5 years ago
Graham
db971f6b2b
Convert indefiniteArticle() to an extension method
5 years ago
Graham
09141e451a
Convert StringUtilsTest to Kotlin
5 years ago
Graham
879e3152fc
Convert StringUtils to Kotlin
5 years ago
Graham
1333cc31e6
Format StringUtilsTest
5 years ago
Graham
ef9e61de33
Add StringUtilsTest
5 years ago
Graham
dd2ba3592d
Add toString() method to ForestDisjointSet partitions
5 years ago
Graham
c1358f6105
Add renamer to the deobfuscator
5 years ago
Graham
e42fcd01b5
Add ForestDisjointSet
5 years ago
Graham
d9d6ab27c1
Add Library class for reading and writing .jar and .pack files
5 years ago