roundTrip :: (Eq a, B.Binary a, ByteSize a) => a -> Bool
roundTrip x = x == decoded && fromIntegral (byteSize x) == BL.length encoded
  where
    encoded = B.encode x
    decoded = B.decode encoded
roundTrip :: (Eq a, B.Binary a, ByteSize a) => a -> Bool
roundTrip x = x == decoded && fromIntegral (byteSize x) == BL.length encoded
  where
    encoded = B.encode x
    decoded = B.decode encoded
roundTrip x = x == decoded && fromIntegral (byteSize x) == BL.length encoded
  where
    encoded = B.encode x
    decoded = B.decode encoded