anchor.diff:  type ByteArrayMemory(bytes: byte[], offset, length) =
       inherit ByteMemory()
   
  +    let checkCount count =
  +        if count < 0 then
  +            raise (ArgumentOutOfRangeException("count", "Count is less than zero."))
  +
       do
           if length < 0 || length > bytes.Length then
               raise (ArgumentOutOfRangeException("length"))
  
positive.code:     override _.Length = length
  
      override _.ReadUtf8String(pos, count) =
          check pos
          check (pos + count - 1)
          System.Text.Encoding.UTF8.GetString(NativePtr.add addr pos, count)
  
      override _.ReadBytes(pos, count) =
          check pos
          check (pos + count - 1)
          let res = Bytes.zeroCreate count
          Marshal.Copy(NativePtr.toNativeInt addr + nativeint pos, res, 0, count)
          res
  
      override _.ReadInt32 pos =
          check pos
  
negative.code:     override _.Length = length
  
      override _.ReadBytes(pos, count) = 
          checkCount count
          if count > 0 then
              Array.sub bytes (offset + pos) count
          else
              Array.empty
  
      override _.ReadInt32 pos =
          let finalOffset = offset + pos
  