def mftRecToBytePos(recno)
      # Return start of mft if rec 0 (no point in the rest of this).
      return mftLoc if recno == 0

      # Find which fragment contains the target mft record.
      start = fragTable[0]; last_clusters = 0; target_cluster = recno * @bytesPerFileRec / @bytesPerCluster
      if (recno > @bytesPerCluster / @bytesPerFileRec) && (fragTable.size > 2)
        total_clusters = 0
        fragTable.each_slice(2) do |vcn, len|
          start = vcn # These are now absolute clusters, not offsets.
          total_clusters += len
          break if total_clusters > target_cluster
          last_clusters += len
        end
        # Toss if we haven't found the fragment.
        raise "MIQ(NTFS::BootSect.mftRecToBytePos) Can't find MFT record #{recno} in data run.\ntarget = #{target_cluster}\ntbl = #{fragTable.inspect}" if total_clusters < target_cluster
      end

      # Calculate offset in target cluster & final byte position.
      offset = (recno - (last_clusters * @bytesPerCluster / @bytesPerFileRec)) * @bytesPerFileRec
      start * @bytesPerCluster + offset
    end
def mftRecToBytePos(recno)
      # Return start of mft if rec 0 (no point in the rest of this).
      return mftLoc if recno == 0

      # Find which fragment contains the target mft record.
      start = fragTable[0]; last_clusters = 0; target_cluster = recno * @bytesPerFileRec / @bytesPerCluster
      if (recno > @bytesPerCluster / @bytesPerFileRec) && (fragTable.size > 2)
        total_clusters = 0
        fragTable.each_slice(2) do |vcn, len|
          start = vcn # These are now absolute clusters, not offsets.
          total_clusters += len
          break if total_clusters > target_cluster
          last_clusters += len
        end
        # Toss if we haven't found the fragment.
        raise "MIQ(NTFS::BootSect.mftRecToBytePos) Can't find MFT record #{recno} in data run.\ntarget = #{target_cluster}\ntbl = #{fragTable.inspect}" if total_clusters < target_cluster
      end

      # Calculate offset in target cluster & final byte position.
      offset = (recno - (last_clusters * @bytesPerCluster / @bytesPerFileRec)) * @bytesPerFileRec
      start * @bytesPerCluster + offset
    end
Use data run to convert mft record number to byte pos.