private static byte[] ValueToBlob(Value val) { int len = val.EstimateSize(); byte[] blob = new byte[len]; val.Write(blob, 0); return(blob); }