<commit_before>// Copyright (c) Cognitect, Inc.
// All rights reserved.

package com.cognitect.transit;

public class TestRoundtrip {

    public static void main(String [] args) throws Exception {

        String encoding = args[0];

        TransitFactory.Format format = encoding.equals("msgpack") ? TransitFactory.Format.MSGPACK : TransitFactory.Format.JSON;

        Reader reader = TransitFactory.reader(TransitFactory.Format.MSGPACK, System.in);
        Writer writer = TransitFactory.writer(TransitFactory.Format.MSGPACK, System.out);

        try {
            while(true) {
                Object o = reader.read();
                writer.write(o);
            }
        }
        catch(Exception e) {
            // exit
        }
    }
}<commit_msg>Use parameter to TestRoundtrip to create correct Reader and Writer<commit_after>// Copyright (c) Cognitect, Inc.
// All rights reserved.

package com.cognitect.transit;

public class TestRoundtrip {

    public static void main(String [] args) throws Exception {

        String encoding = args[0];

        TransitFactory.Format format = encoding.equals("msgpack") ? TransitFactory.Format.MSGPACK : TransitFactory.Format.JSON;

        Reader reader = TransitFactory.reader(format, System.in);
        Writer writer = TransitFactory.writer(format, System.out);

        try {
            while(true) {
                Object o = reader.read();
                writer.write(o);
            }
        }
        catch(Exception e) {
            // exit
        }
    }
}
{'fraction_non_alphanumeric': 0.10202746893394375, 'fraction_numerical': 0.0013080444735120995, 'mean_word_length': 2.1875, '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': '5523014', 'n_tokens_mistral': 426, 'n_tokens_neox': 400, 'n_words': 99}