Add support for encoding data