コード例 #1
0
        internal BlobIdx GetBlobIndex(ImmutableArray <byte> blob)
        {
            BlobIdx index;

            if (!_blobs.TryGetValue(blob, out index))
            {
                Debug.Assert(!_streamsAreComplete);

                index = new BlobIdx(_blobHeapSize);
                _blobs.Add(blob, index);

                _blobHeapSize += BlobBuilder.GetCompressedIntegerSize(blob.Length) + blob.Length;
            }

            return(index);
        }