pub fn from_bytes(header_string: &[u8]) -> Self {
        let header_record = unsafe {
            let l_text = header_string.len();
            let text = ::libc::malloc(l_text + 1);
            ::libc::memset(text, 0, l_text + 1);
            ::libc::memcpy(
                text,
                header_string.as_ptr() as *const ::libc::c_void,
                header_string.len(),
            );

            let rec = htslib::sam_hdr_parse((l_text + 1) as i32, text as *const i8);
            (*rec).text = text as *mut i8;
            (*rec).l_text = l_text as u32;
            rec
        };

        HeaderView::new(header_record)
    }
/// Create a new HeaderView from bytes
Create a new HeaderView from bytes
Create a new HeaderView from bytes
pub fn from_bytes(header_string: &[u8]) -> Self {
        let header_record = unsafe {
            let l_text = header_string.len();
            let text = ::libc::malloc(l_text + 1);
            ::libc::memset(text, 0, l_text + 1);
            ::libc::memcpy(
                text,
                header_string.as_ptr() as *const ::libc::c_void,
                header_string.len(),
            );
            let rec = htslib::sam_hdr_parse((l_text + 1) as i32, text as *const i8);
            (*rec).text = text as *mut i8;
            (*rec).l_text = l_text as u32;
            rec
        };
        HeaderView::new(header_record)
    }
pub fn from_bytes ( header_string : & [ u8 ] ) -> Self { let header_record = unsafe { let l_text = header_string . len ( ) ; let text = :: libc :: malloc ( l_text + 1 ) ; :: libc :: memset ( text , 0 , l_text + 1 ) ; :: libc :: memcpy ( text , header_string . as_ptr ( ) as * const :: libc :: c_void , header_string . len ( ) , ) ; let rec = htslib :: sam_hdr_parse ( ( l_text + 1 ) as i32 , text as * const i8 ) ; ( * rec ) . text = text as * mut i8 ; ( * rec ) . l_text = l_text as u32 ; rec } ; HeaderView :: new ( header_record ) }
Create a new HeaderView from bytes
Create a new HeaderView from bytes
header_string
&[u8]
header_string
&[u8]