def getToLimit(clus, limit)
      # Init.
      out = MemoryBuffer.create(limit)
      pos = 0
      cur_clus = clus

      # How many clusters fill request.
      num = limit.divmod(@bytesPerCluster)
      num_clus = num[0]; num_clus += 1 if num[1] > 0

      # Loop until done or EOF.
      while num_clus > 0

        # Find number of contiguous clusters & trim by num_clus.
        contig = countContigClusters(cur_clus)
        red_clus = num_clus > contig ? contig : num_clus

        # Get data.
        chunk = red_clus * @bytesPerCluster
        @stream.seek(clusToByte(cur_clus))
        out[pos, chunk] = @stream.read(chunk)
        pos += chunk

        # Inc current & dec number to read.
        cur_clus += (red_clus - 1); num_clus -= red_clus

        # Get next cluster & abort if end of chain.
        cur_clus = getFatEntry(cur_clus)
        break if cur_clus > CC_END_OF_CHAIN
      end

      # Return next cluster & data.
      [cur_clus, out]
    end
def getToLimit(clus, limit)
      # Init.
      out = MemoryBuffer.create(limit)
      pos = 0
      cur_clus = clus

      # How many clusters fill request.
      num = limit.divmod(@bytesPerCluster)
      num_clus = num[0]; num_clus += 1 if num[1] > 0

      # Loop until done or EOF.
      while num_clus > 0

        # Find number of contiguous clusters & trim by num_clus.
        contig = countContigClusters(cur_clus)
        red_clus = num_clus > contig ? contig : num_clus

        # Get data.
        chunk = red_clus * @bytesPerCluster
        @stream.seek(clusToByte(cur_clus))
        out[pos, chunk] = @stream.read(chunk)
        pos += chunk

        # Inc current & dec number to read.
        cur_clus += (red_clus - 1); num_clus -= red_clus

        # Get next cluster & abort if end of chain.
        cur_clus = getFatEntry(cur_clus)
        break if cur_clus > CC_END_OF_CHAIN
      end

      # Return next cluster & data.
      [cur_clus, out]
    end
Return continuous data from a beginning cluster to limit bytes (or EOF).