Skip to content

westernsam/experiments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Experiments

json-serialization

A simple scala Map[String, [Map|Iterable|Primative]] -> json serializer using a state machine to avoid recursion. Also streams json to output stream to avoid unnecessary string allocation.

Utf8 String

A Utf8String implementation that stores byte[] rather than char[] - hence can store (most) string in half the space. Length returns number of code points rather than size of array (as is the case with java.lan.String). Stores offsets of multi-byte characters in smallest type possible

  • first 64 bytes offsets are stored in byte array with 2 bits for length and 6 bits (64) for position
  • next 16384 bytes in char array with 2 bits for length and 14 bits (16384) for position
  • next 1073741824 bytes in int array with 2 bits for length and 30 bits (1073741824) for position

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published