Make ByteArrayEncoder sharable