-1

Uiua, 5 bytes
⍜ₙ⌈2⧻
Try it: Uiua pad
Uiua's number type is float64 (double-precision), so I represented the input as an array of bytes 0-255, little endian. (Is that a cheaty numeric representation? It seemed reasonable to me.)
The ⧻ length of the array is the number of bytes needed to store the...