and TCompactProtocol is a final class. I could not extend it. Added ThriftProtocolWrapper class that can be used with TCompactProtocol and others.