Skip to content

Commit d1899c1

Browse files
committed
Remove unnecessary check that Padmé overhead is at most 12%
It's easy enough to verify exhaustively for any plausible chunker params that Padmé always produces at most a 12% overhead. Checking that again at runtime is pointless.
1 parent da3105f commit d1899c1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/borg/compress.pyx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -613,11 +613,7 @@ class ObfuscateSize(CompressorBase):
613613

614614
padded_size = (compr_size + bitMask) & ~bitMask # Apply rounding
615615

616-
# Ensure max 12% overhead
617-
max_allowed = int(compr_size * 1.12)
618-
final_size = min(padded_size, max_allowed)
619-
620-
return final_size - compr_size # Return only the additional padding size
616+
return padded_size - compr_size # Return only the additional padding size
621617

622618
# Maps valid compressor names to their class
623619
COMPRESSOR_TABLE = {

0 commit comments

Comments
 (0)