   for i in [1...loop_limit] by loop_skip
     test_bx_output(T, 64, i, b64stock.encode)
   cb()
+
+exports.test_b62_streaming_correctness = (T, cb) ->
+  for i in [1...loop_limit] by loop_skip
+    test_bx_streaming_correctness(T, 62, i)
+  cb()

  block_encoder.write(data)
  encoded_data = encoder.read()
  block_encoded_data = block_encoder.read()

  T.equal(encoded_data, block_encoded_data, "max was right: base=#{base} len=#{len}")

encoding_for_base = (base) ->
  switch base


loop_limit = 5000
loop_skip = 29

first_different_byte = (buf1, buf2) ->
  limit = if buf1.length < buf2.length then buf1.length else buf2.length
  for i in [0...limit]
    if buf1[i] != buf2[i]
      return i
  return -1

stream_random_data = (strm, len) ->
  data = prng(len)
