Return history as binary data to fix slow json serialization