Пример #1
0
        public long MapPosition(long pos)
        {
            long vcn        = pos / _bytesPerCluster;
            int  dataRunIdx = _cookedRuns.FindDataRun(vcn, 0);

            if (_cookedRuns[dataRunIdx].IsSparse)
            {
                return(-1);
            }
            else
            {
                return((_cookedRuns[dataRunIdx].StartLcn * _bytesPerCluster) + (pos - (_cookedRuns[dataRunIdx].StartVcn * _bytesPerCluster)));
            }
        }
Пример #2
0
        public override bool IsClusterStored(long vcn)
        {
            int runIdx = _cookedRuns.FindDataRun(vcn, 0);

            return(!_cookedRuns[runIdx].IsSparse);
        }