bytearray64reader: read length of zero and EOF are properly distinguished (gdx is somewhat pedantic); changed an ascii85 charset; working meta (de)serialisation

This commit is contained in:
minjaesong
2021-09-01 17:23:12 +09:00
parent 07f26a7716
commit f08296b3be
11 changed files with 109 additions and 315 deletions

View File

@@ -6,8 +6,13 @@ package net.torvald.terrarum.serialise
* just gzip the inputstream instead!
*/
object Ascii85 {
/** As per RFC-1924 */
private const val CHAR_TABLE = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#${'$'}%&()*+-;<=>?@^_`{|}~"
/** My own string set that:
* - no "/": avoids nonstandard JSON comment key which GDX will happily parse away
* - no "\": you know what I mean\\intention
* - no "$": avoids Kotlin string template
* - no "[{]},": even the dumbest parser can comprehend the output
*/
private const val CHAR_TABLE = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#%&'()*+-.:;<=>?@^_`|~"
/** As per Adobe standard */
//private val CHAR_TABLE = (33 until (33+85)).toList().map { it.toChar() }.joinToString("") // testing only!