Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 677 Bytes

Bytes Arrays.md

File metadata and controls

18 lines (15 loc) · 677 Bytes

Fixed-size Byte Arrays: The value types bytes1, bytes2, bytes3, …, bytes32 hold a sequence of bytes from one to up to 32. The type byte[] is an array of bytes, but due to padding rules, it wastes 31 bytes of space for each element (except in storage). It is better to use the bytes type instead.


Slide Screenshot

051.jpg


Slide Deck

  • Fixed-size Byte Arrays
  • bytes1, bytes2..bytes32
  • bytes vs. byte[] -> Wastage
  • bytes -> Byte Storage
  • E.g. Hashes

References