fn add_padding_bits(
    out: &mut [u8],
    inp: &[u8],
    olinebits: usize,
    ilinebits: usize,
    h: usize,
) {
    let diff = olinebits - ilinebits; /*bit pointers*/
    let mut obp = 0;
    let mut ibp = 0;
    for _ in 0..h {
        for _ in 0..ilinebits {
            let bit = read_bit_from_reversed_stream(&mut ibp, inp);
            set_bit_of_reversed_stream(&mut obp, out, bit);
        }
        for _ in 0..diff {
            set_bit_of_reversed_stream(&mut obp, out, 0u8);
        }
    }
}
/*The opposite of the remove_padding_bits function
olinebits must be >= ilinebits*/
The opposite of the remove_padding_bits function
olinebits must be >= ilinebits
The opposite of the remove_padding_bits function olinebits must be > = ilinebits
fn add_padding_bits(
    out: &mut [u8],
    inp: &[u8],
    olinebits: usize,
    ilinebits: usize,
    h: usize,
) {
    let diff = olinebits - ilinebits; /*bit pointers*/
    let mut obp = 0;
    let mut ibp = 0;
    for _ in 0..h {
        for _ in 0..ilinebits {
            let bit = read_bit_from_reversed_stream(&mut ibp, inp);
            set_bit_of_reversed_stream(&mut obp, out, bit);
        }
        for _ in 0..diff {
            set_bit_of_reversed_stream(&mut obp, out, 0u8);
        }
    }
}
fn add_padding_bits ( out : & mut [ u8 ] , inp : & [ u8 ] , olinebits : usize , ilinebits : usize , h : usize , ) { let diff = olinebits - ilinebits ; /*bit pointers*/ let mut obp = 0 ; let mut ibp = 0 ; for _ in 0 .. h { for _ in 0 .. ilinebits { let bit = read_bit_from_reversed_stream ( & mut ibp , inp ) ; set_bit_of_reversed_stream ( & mut obp , out , bit ) ; } for _ in 0 .. diff { set_bit_of_reversed_stream ( & mut obp , out , 0u8 ) ; } } }
The opposite of the remove_padding_bits function
olinebits must be >= ilinebits
The opposite of the remove_padding_bits function olinebits must be > = ilinebits
out
&mut [u8]
inp
&[u8]
olinebits
usize
ilinebits
usize
h
usize