Added actual compressed length and added call to encode_data kernel