Skip to content

Instantly share code, notes, and snippets.

@amacal
Created April 20, 2021 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amacal/acb694fee178a954ee8c1969506b782b to your computer and use it in GitHub Desktop.
Save amacal/acb694fee178a954ee8c1969506b782b to your computer and use it in GitHub Desktop.
public class InMemory
{
public KeyBlock Keys();
public ValueBlock Values();
}
public class KeyBlock
{
public int Insert(byte[] data);
public int Hash(KeyReference reference, DataHasher hasher);
public bool Verify(KeyReference reference, byte[] key);
}
public class ValueBlock
{
public int Insert(byte[] data);
public void Update(ValueReference reference, byte[] value);
public void Remove(ValueReference reference);
public byte[] Extract(ValueReference reference);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment