Add bounded commit-pinned Hugging Face source streaming

This commit is contained in:
ms2k 2026-07-17 06:32:48 +09:00
commit e13c01441c

View file

@ -0,0 +1,24 @@
mod body;
mod error;
mod sort;
mod source;
mod types;
pub use body::HfSourceBody;
pub use error::HfSourceError;
pub use source::{HfInventory, HfSource};
pub use types::{
HfInventoryDescriptor, HfMember, HfMemberStorage, HfRepoType, HfSelection, HfSnapshotIdentity,
HfSourceRequest,
};
fn digest_hex(bytes: impl AsRef<[u8]>) -> String {
const DIGITS: &[u8; 16] = b"0123456789abcdef";
let bytes = bytes.as_ref();
let mut encoded = String::with_capacity(bytes.len() * 2);
for &byte in bytes {
encoded.push(DIGITS[(byte >> 4) as usize] as char);
encoded.push(DIGITS[(byte & 0x0f) as usize] as char);
}
encoded
}