func setByte(_ offset: Int, byte: UInt8)

You should not use setByte() and getByte().

func getByte(_ offset: Int) -> UInt8


{
    // your code
}