Collation of @kud1ing's work in #9511, #9512, #9513 and #9518.
}
/**
- * Transform a byte-vector into a bitv. Each byte becomes 8 bits,
+ * Transform a byte-vector into a `Bitv`. Each byte becomes 8 bits,
* with the most significant bits of each byte coming first. Each
- * bit becomes true if equal to 1 or false if equal to 0.
+ * bit becomes `true` if equal to 1 or `false` if equal to 0.
*/
-pub fn from_utf8(bytes: &[u8]) -> Bitv {
+pub fn from_bytes(bytes: &[u8]) -> Bitv {
from_fn(bytes.len() * 8, |i| {
let b = bytes[i / 8] as uint;
let offset = i % 8;