Add a getType() method
Add a parameter to allow the bypass of the BWT post processing steps: MTFT and ZLT.

In other words, it is now possible to run a raw BWT now.

Even though the BWT is a transform (input size == output size), the codec without ZLT is still a function (output size != input size in general).

The output buffer must be bigger than the input buffer since the BWT primary index must be stored in the output (up to 4 bytes). See getMaxEncodedLength().
Add support for raw BWT as first stage.
It allows the creation of optimized custom second stage code merging BWT post process steps and entropy coding.
Also, relax the constraint that the block size after stage one must be smaller (or equal to) the initial block size. The first stage can now grow the size of the input.
Fix a performance bug that would force the re-creation of the output buffer for each block. Now, the output buffer is reused if big enough.
Add a block size validity check when reading the bitstream header.
Flatten the states array to avoid overhead of array allocations
Merge two similar code pieces into one and remove lazy array creation. Modify the Go implementation and make it closer to the Java one.