For Java, Avro has already support of compressions such as deflate or snappy based on its own codec infrastructure. To support encryption, this work needs to extend the codec infrastructure with the ability to handle codec context such as the encryption keys. The reader and writer needs to be extended for context handling as well. Also AES codec will be implemented as the default encryption codec.
To keep the compatibility of the reader and writer, new constructor and methods with codec context can be added instead of modifying the existing methods. Although there are other ways for passing in the codec context such as using thread local or system properties, these methods are easier to cause problems, not direct and not self explaining at the API level.