diff --git a/blake3.lua b/blake3.lua index 0f4c6d4..3e56bd5 100644 --- a/blake3.lua +++ b/blake3.lua @@ -118,6 +118,23 @@ local function merge(cvl, cvr) return cvl end +local function expand(out, len, offset) + expect(1, out, "table") + expect(1, len, "number") + expect(2, offset, "nil", "number") + offset = offset or 0 + + -- Expand output. + local out = {} + for i = 0, len / 64 do + local n = offset + i + local md = compress(out.cv, out.m, n, out.n, out.f, true) + out[i + 1] = ("