Skip to content

Commit

Permalink
fix: typeo
Browse files Browse the repository at this point in the history
  • Loading branch information
nugaon committed Mar 24, 2022
1 parent 221b7b2 commit 7606341
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export function getBmtIndexOfSegment(
const maxSegmentCount = maxChunkPayloadByteLength / SEGMENT_SIZE
const chunkBmtLevels = Math.log2(maxSegmentCount) // 7 by default
// last segment index in the file
const lastSegmentIndex = Math.floor((spanValue - 1) % SEGMENT_SIZE)
const lastSegmentIndex = Math.floor((spanValue - 1) / SEGMENT_SIZE)
// the saturated byte length in the BMT tree (on the left)
const fullBytesLength = spanValue - (spanValue % maxChunkPayloadByteLength)
// the saturated segments length in the BMT tree (on the left)
Expand Down

0 comments on commit 7606341

Please sign in to comment.