module Sprockets::SourceMapUtils

def vlq_encode(ary)

Returns a VLQ String.

ary - An Array of Integers

Public: Encode a list of numbers into a compact VLQ string.
def vlq_encode(ary)
  result = []
  ary.each do |n|
    vlq = n < 0 ? ((-n) << 1) + 1 : n << 1
    loop do
      digit  = vlq & VLQ_BASE_MASK
      vlq  >>= VLQ_BASE_SHIFT
      digit |= VLQ_CONTINUATION_BIT if vlq > 0
      result << BASE64_DIGITS[digit]
      break unless vlq > 0
    end
  end
  result.join
end