Added compact mode for java binary writer/reader. Now incompatible until c++ implementation finished