title: Does binary encoding of AVRO compress data?
body: <p>In one of our projects we are using Kafka with AVRO to transfer data across applications. Data is added to an AVRO object and object is binary encoded to write to Kafka. We use binary encoding as it is generally mentioned as a minimal representation compared to other formats.</p>
  
  <p>The data is usually a JSON string and when it is saved in a file, it uses up to 10 Mb of disk. However, when the file is compressed (.zip), it uses only few KBs. We are concerned storing such data in Kafka, so trying to compress before writing to a Kafka topic. </p>
  
  <p>When length of binary encoded message (i.e. length of byte array) is measured, it is proportional to the length of the data string. So I assume binary encoding is not reducing any size.</p>
  
  <p>Could someone tell me if binary encoding compresses data? If not, how can I apply compression?</p>
  
  <p>Thanks!</p>