Make type compression optional.
Make JavaWriter class non final so that it is easier to mock.