fn rle_regression() {
        let values = vec![809201799168u64; 509];
        let mut enc = vec![];
        encode(&values, &mut enc).expect("encoding failed");

        // this is a compressed rle integer block representing 509 identical
        // 809201799168 values.
        let enc_influx = [32, 0, 0, 1, 120, 208, 95, 32, 0, 0, 252, 3];

        // ensure that encoder produces same bytes as InfluxDB encoder.
        assert_eq!(enc, enc_influx);

        let mut dec = vec![];
        decode(&enc, &mut dec).expect("failed to decode");

        assert_eq!(dec.len(), values.len());
        assert_eq!(dec, values);
    }
// This tests against a defect found when decoding a TSM block from InfluxDB.
This tests against a defect found when decoding a TSM block from InfluxDB.
This tests against a defect found when decoding a TSM block from InfluxDB .
fn rle_regression() {
        let values = vec![809201799168u64; 509];
        let mut enc = vec![];
        encode(&values, &mut enc).expect("encoding failed");
        // this is a compressed rle integer block representing 509 identical
        // 809201799168 values.
        let enc_influx = [32, 0, 0, 1, 120, 208, 95, 32, 0, 0, 252, 3];
        // ensure that encoder produces same bytes as InfluxDB encoder.
        assert_eq!(enc, enc_influx);
        let mut dec = vec![];
        decode(&enc, &mut dec).expect("failed to decode");
        assert_eq!(dec.len(), values.len());
        assert_eq!(dec, values);
    }
fn rle_regression ( ) { let values = vec ! [ 809201799168u64 509 ] ; let mut enc = vec ! [ ] ; encode ( & values , & mut enc ) . expect ( " " ) ; // this is a compressed rle integer block representing 509 identical // 809201799168 values. let enc_influx = [ 32 , 0 , 0 , 1 , 120 , 208 , 95 , 32 , 0 , 0 , 252 , 3 ] ; // ensure that encoder produces same bytes as InfluxDB encoder. assert_eq ! ( enc enc_influx ) ; let mut dec = vec ! [ ] ; decode ( & enc , & mut dec ) . expect ( " " ) ; assert_eq ! ( dec len ( ) values len ( ) ) ; assert_eq ! ( dec values ) ; }
This tests against a defect found when decoding a TSM block from InfluxDB.
This tests against a defect found when decoding a TSM block from InfluxDB .