Skip to main content

Module sparse

Module sparse 

Source
Expand description

Sparse checkout utilities for partial corpus downloads.

This module provides tools for working with git sparse checkout, allowing you to download only specific files from a corpus repository.

§Example

use codec_eval::corpus::sparse::{SparseCheckout, SparseFilter};

// Clone with sparse checkout
let sparse = SparseCheckout::clone(
    "https://github.com/example/codec-corpus.git",
    "./corpus",
)?;

// Add specific paths
sparse.add_paths(&["images/photos/*.png", "images/screenshots/"])?;

// Or use filters
sparse.add_filter(SparseFilter::Category("photos"))?;
sparse.add_filter(SparseFilter::Format("png"))?;

// Fetch the files
sparse.fetch()?;

Structs§

SparseCheckout
Sparse checkout manager for git repositories.
SparseStatus
Status of a sparse checkout repository.

Enums§

SparseFilter
Filter for selecting files in sparse checkout.

Functions§

preview_patterns
List files that would be matched by patterns (without checking out).