pub fn pack_coils(coils: &[bool], bytes: &mut [u8]) -> Result<usize, Error>
Pack coils into a byte array.
It returns the number of bytes used to pack the coils.