<commit_before>! Copyright (C) 2009 <NAME>.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors bitstreams io io.streams.string kernel tools.test
grouping compression.lzw multiline ;
IN: bitstreams.tests

[ 1 ]
[ B{ 254 } <string-reader> <bitstream-reader> read-bit ] unit-test

[ 254 ]
[ B{ 254 } <string-reader> <bitstream-reader> 8 swap read-bits ] unit-test

[ 4095 ]
[ B{ 255 255 } <string-reader> <bitstream-reader> 12 swap read-bits ] unit-test

[ B{ 254 } ]
[
    <string-writer> <bitstream-writer> 254 8 rot
    [ write-bits ] keep stream>> >byte-array
] unit-test


/*
[
    
] [
    B{ 7 7 7 8 8 7 7 9 7 }
    [ byte-array>bignum >bin 72 CHAR: 0 pad-head 9 group [ bin> ] map ]
    [ lzw-compress ] bi
] unit-test
*/
<commit_msg>add using<commit_after>! Copyright (C) 2009 <NAME>.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors bitstreams io io.streams.string kernel tools.test
grouping compression.lzw multiline byte-arrays ;
IN: bitstreams.tests

[ 1 ]
[ B{ 254 } <string-reader> <bitstream-reader> read-bit ] unit-test

[ 254 ]
[ B{ 254 } <string-reader> <bitstream-reader> 8 swap read-bits ] unit-test

[ 4095 ]
[ B{ 255 255 } <string-reader> <bitstream-reader> 12 swap read-bits ] unit-test

[ B{ 254 } ]
[
    <string-writer> <bitstream-writer> 254 8 rot
    [ write-bits ] keep output>> >byte-array
] unit-test


/*
[
    
] [
    B{ 7 7 7 8 8 7 7 9 7 }
    [ byte-array>bignum >bin 72 CHAR: 0 pad-head 9 group [ bin> ] map ]
    [ lzw-compress ] bi
] unit-test
*/

{'fraction_non_alphanumeric': 0.14556135770234988, 'fraction_numerical': 0.06135770234986945, 'mean_word_length': 3.077127659574468, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1445314', 'n_tokens_mistral': 660, 'n_tokens_neox': 560, 'n_words': 168}