// an array of 6-byte integers persistable sclass HalfLongs { short[] data; int length; *(int *length) { data = new short[safeToInt(length*3L)]; } public int size() { ret length; } public void set(int i, long val) { data[i*3] = (short) val; data[i*3+1] = (short) (val >> 16); data[i*3+2] = (short) (val >> 32); } public long get(int i) { ret ushortToLong(data[i*3]) | (ushortToLong(data[i*3+1]) << 16) | (data[i*3+2] << 32); } }