public T DecodeMessage <T>(byte[] data, int dataOffset, int dataLength) { if (data == null) { throw new CannotDeserializeMessageException("The data which is to be deserialized cannot be null."); } if (CompressionEnabled) { return(ProtocolBuffersConvert.DeserializeObject <T>(GZipCompression.Decompress(data, dataOffset, dataLength))); } else { return(ProtocolBuffersConvert.DeserializeObject <T>(data, dataOffset, dataLength)); } }