Repositories (1)

rawrxd
7 snippets stored for this repo
Rust IconRust
use std::{fs, io};

use rawrxd::{rar14, rar15, rar50, RarResult, Signature};

fn dump_headers(filename: &str) -> RarResult<()> {
    println!("{filename}");
Rust IconRust
/// # Examples
    ///
    /// ```no_run
    /// # use rawrxd::Signature;
    /// # use std::io;
    /// # fn main() -> io::Result<()> {
    /// # let mut file = io::Cursor::new(Vec::new());
Rust IconRust
use crate::rar15::block_iterator;

use rawrxd::Error;
use rstest::rstest;

/// Archive whose header_size is set to 0, or whose offset + header_size or offset + size
/// exceed the EOF.
Rust IconRust
use std::{fs, io};

use rawrxd::{rar50, Signature};

mod unicode_filename;

fn block_iterator(file_name: &str) -> rar50::BlockIterator<io::BufReader<fs::File>> {
Rust IconRust
use rawrxd::rar50::{Block, BlockKind};

use super::block_iterator;

#[test]
fn unicode_filename() {
    let mut iter = block_iterator("unix_high_ascii_filename.rar");
Rust IconRust
use std::{fs, io};

use rawrxd::Signature;

/// Not a RAR archive.
#[test]
fn bad_archive() {
Rust IconRust
use std::{fs, io};

use rawrxd::{rar15, Signature};

mod corrupt_header;

fn block_iterator(file_name: &str) -> rar15::BlockIterator<io::BufReader<fs::File>> {