anchor.diff:          ((uint16 bytes.[finalOffset + 1]) <<< 8)
   
       override _.ReadUtf8String(pos, count) =
  -        System.Text.Encoding.UTF8.GetString(bytes, offset + pos, count)
  +        checkCount count
  +        if count > 0 then
  +            System.Text.Encoding.UTF8.GetString(bytes, offset + pos, count)
  +        else
  +            String.Empty
   
       override _.Slice(pos, count) =
  -        ByteArrayMemory(bytes, offset + pos, count) :> ByteMemory
  +        checkCount count
  +        if count > 0 then
  +            ByteArrayMemory(bytes, offset + pos, count) :> ByteMemory
  +        else
  +            ByteArrayMemory(Array.empty, 0, 0) :> ByteMemory
   
       override _.CopyTo stream =
  -        stream.Write(bytes, offset, length)
  +        if length > 0 then
  +            stream.Write(bytes, offset, length)
   
       override _.Copy(srcOffset, dest, destOffset, count) =
  -        Array.blit bytes (offset + srcOffset) dest destOffset count
  +        checkCount count
  +        if count > 0 then
  +            Array.blit bytes (offset + srcOffset) dest destOffset count
   
       override _.ToArray() =
  -        Array.sub bytes offset length
  +        if length > 0 then
  +            Array.sub bytes offset length
  +        else
  +            Array.empty
   
       override _.AsStream() =
  -        new MemoryStream(bytes, offset, length) :> Stream
  +        if length > 0 then
  +            new MemoryStream(bytes, offset, length) :> Stream
  +        else
  +            new MemoryStream([||], 0, 0, false) :> Stream
   
       override _.AsReadOnlyStream() =
  -        new MemoryStream(bytes, offset, length, false) :> Stream
  +        if length > 0 then
  +            new MemoryStream(bytes, offset, length, false) :> Stream
  +        else
  +            new MemoryStream([||], 0, 0, false) :> Stream
   
   [<Sealed>]
   type SafeUnmanagedMemoryStream =
  
positive.code:     override _.Length = length
  
      override _.ReadBytes(pos, count) = 
          Array.sub bytes (offset + pos) count
  
      override _.ReadInt32 pos =
          let finalOffset = offset + pos
  
negative.code:     let check i =
          if i < 0 || i >= length then 
              raise (ArgumentOutOfRangeException("i"))
  
      let checkCount count =
          if count < 0 then
              raise (ArgumentOutOfRangeException("count", "Count is less than zero."))
  
      do
          if length < 0 then
  