Add `from_bytes` methods, improve serialization.
afck opened this issue · 0 comments
afck commented
Serializing a public key with bincode
wastes 8 bytes:
assert_eq!(pk.to_bytes().len(), 48);
assert_eq!(bincode::serialize(&pk).unwrap().len(), 56);
Can we bring that size down to 48 bytes?
In either case, we should add a from_bytes
method that turns a compressed public key back into a PublicKey
struct.