<commit_before>import dissolve from 'dissolve'

function createDataStream() {
  return dissolve()
    .loop(function() {
      this
        .uint32("length")
        .int8("type")
        .tap(function() {
          if (this.vars.length) {
            this.buffer("payload", this.vars.length);
          }
        })
        .tap(function() {
          this.push(this.vars);
          this.vars = {};
        });
    });
}<commit_msg>Export createDataStream<commit_after>import dissolve from 'dissolve'

export default function createDataStream() {
  return dissolve()
    .loop(function() {
      this
        .uint32("length")
        .int8("type")
        .tap(function() {
          if (this.vars.length) {
            this.buffer("payload", this.vars.length);
          }
        })
        .tap(function() {
          this.push(this.vars);
          this.vars = {};
        });
    });
}
{'fraction_non_alphanumeric': 0.15453527435610304, 'fraction_numerical': 0.006718924972004479, 'mean_word_length': 1.7423312883435582, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2992993', 'n_tokens_mistral': 272, 'n_tokens_neox': 258, 'n_words': 43}