Skip to content

Commit

Permalink
[Normal] Update Some Code
Browse files Browse the repository at this point in the history
  • Loading branch information
ColdWindScholar committed Aug 2, 2024
1 parent a92c790 commit 5353167
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions dumper.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,12 @@ def data_for_op(self, operation, out_file, old_file):
op = operation["operation"]

# assert hashlib.sha256(data).digest() == op.data_sha256_hash, 'operation data hash mismatch'
if op.type == op.REPLACE_ZSTD and payloadfile.read(4) != b'\x28\xb5\x2f\xfd':
op_type = op.REPLACE
else:
op_type = op.type
payloadfile.seek(payloadfile.tell() - 4)
op_type = op.type
print(op.type)
if op.type == op.REPLACE_ZSTD:
if payloadfile.read(4) != b'(\xb5/\xfd':
op_type = op.REPLACE
payloadfile.seek(payloadfile.tell() - 4)
if op_type == op.REPLACE_ZSTD:
dec = zstandard.ZstdDecompressor().decompressobj()
while processed_len < data_length:
Expand Down

0 comments on commit 5353167

Please sign in to comment.