def packed.compress

mylsm-lsm-store@0.6.0.1 · src/hub_sha/sha256.bend:64

import mylsm-lsm-store@0.6.0.1/src/hub_sha/sha256.bend as Sha256
import Base
import mylsm-lsm-store@0.6.0.1/src/hub_sha/core.bend as Core
import mylsm-lsm-store@0.6.0.1/src/hub_sha/state.bend as S

64# Compress one packed block using sixteen transient big-endian words. The file
65# buffer stays packed; no per-byte List is constructed for complete blocks.
66def packed.compress(words: List<&2, U32>, state: S.State) -> S.State:
67  match words:
68    case a <> b <> c <> d <> e <> f <> g <> h <> i <> j <> k <> l <> m <> n <> o <> p <> Nil{}:
69      Core.fips_compress16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, 48n, state)
70    case _:
71      state

Uses (4)

Used by (1)