ByteManifest.decode.checksum.copies: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/ByteManifest.bend as ByteManifest Lines 181-192 of mylsm-lsm-store@0.6.0.1/src/ByteManifest.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteManifest.bend&start_line=181&end_line=192 import Base import mylsm-lsm-store@0.6.0.1/src/hub_sha/sha256.bend as SHA import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes # Hashes one owned copy and compares the other with the stored digest. def decode.checksum.copies( value: ManifestValue, +offset: U32, copies: Bytes.Bytes & Bytes.Bytes ) -> Result<&1, &1, Error, ManifestValue>: match copies: case (for_hash, for_digest): decode.checksum.compare(value, equal(Bytes.eq(SHA.sha256_packed_bytes(slice.result( Bytes.slice(for_hash, 0, offset))), slice.result(Bytes.slice(for_digest, offset, 32))))) Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=eq https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=slice https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteManifest.bend&name=Error https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteManifest.bend&name=ManifestValue https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteManifest.bend&name=decode.checksum.compare https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteManifest.bend&name=equal https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteManifest.bend&name=slice.result https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/hub_sha/sha256.bend&name=sha256_packed_bytes