Lines Matching defs:chunk
39 fun createLastChunk (chunk, messageByteSize) =
41 val chunkSize = Word8Vector.length chunk
43 (* Size in bits is stored in the chunk *)
46 if i < chunkSize then Word8Vector.sub (chunk, i)
61 fun addPadding chunk =
63 val chunkSize = Word8Vector.length chunk
65 if i < chunkSize then Word8Vector.sub (chunk, i)
75 (* Size in bits is stored in the chunk *)
87 else raise (Fail "createPadChunk: invalid chunk size")
103 | readChunk (PadChunk chunk) = SOME (chunk, Empty)
106 val (chunk, nextByteStreamState) = byteReader (byteStreamState, 64)
107 val chunkSize = Word8Vector.length chunk
111 if chunkSize = 64 then SOME (chunk, Reading(byteReader,
113 else if chunkSize < 56 then SOME(createLastChunk (chunk,
116 SOME(addPadding chunk, PadChunk (createPadChunk nextTotalBytesRead))
123 fun initializeWorkingArrayWithDataFromChunk (chunk, wArray) =
139 (Word32Array.update (wArray, i, sub (chunk, i))
165 chunk (preprocessed into a working array by fillWorkingArray),
238 to process each chunk *)
244 | SOME (chunk, nextChunkStreamState) =>
247 initializeWorkingArrayWithDataFromChunk (chunk, workingArray)
250 with the current chunk's data) using the sha1