mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
doc: consolidate use of multiple-byte units
Refs: https://en.wikipedia.org/wiki/Byte#Multiple-byte_units PR-URL: https://github.com/nodejs/node/pull/42587 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
This commit is contained in:
parent
51fd5db4c1
commit
1e761654d3
26 changed files with 46 additions and 46 deletions
|
@ -21,7 +21,7 @@ if __name__ == '__main__':
|
|||
|
||||
# To make decompression a little easier, we prepend the compressed data
|
||||
# with the size of the uncompressed data as a 24 bits BE unsigned integer.
|
||||
assert len(text) < 1 << 24, 'Uncompressed JSON must be < 16 MB.'
|
||||
assert len(text) < 1 << 24, 'Uncompressed JSON must be < 16 MiB.'
|
||||
data = struct.pack('>I', len(text))[1:4] + data
|
||||
|
||||
step = 20
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue