    }

    Ok(vals)
}

fn read_bytes_padded<R: io::Read>(r: &mut R, len: usize) -> Result<Vec<u8>> {
    // string length is rounded to the nearest 4 bytes
    let buflen = if len % 4 == 0 {
        len
    } else {
        len + (4 - (len % 4))
    };
