///|
fn decode_utf8(value : Bytes) -> String raise {
@encoding/utf8.decode(value[:]) catch {
_ => raise InvalidUtf8(value)
}
}
///|
fn int64_to_int(value : Int64) -> Int raise {
if value > @int.MAX_VALUE.to_int64() || value < @int.MIN_VALUE.to_int64() {
raise IntegerOverflow(value)
}
value.to_int()
}