Function noLZSS::factorize_file
Defined in File factorizer.cpp
Function Documentation
-
std::vector<Factor> noLZSS::factorize_file(const std::string &path, size_t reserve_hint)
Factorizes text from a file and returns factors as a vector.
Factorizes text from a file into noLZSS factors.
This function reads text from a file, performs factorization, and returns all factors in a vector. The reserve_hint parameter can improve performance when you have an estimate of the number of factors.
Reads text from a file and performs noLZSS factorization. This is more memory-efficient for large files as it avoids loading the entire file into memory.
See also
factorize() for in-memory factorization
See also
factorize() for in-memory factorization
Note
Use reserve_hint for better performance when you know approximate factor count
Note
This is more memory-efficient than factorize() for large files
Note
Use reserve_hint for better performance when you know approximate factor count
- Parameters:
path – Path to input file containing text
reserve_hint – Optional hint for reserving space in output vector (0 = no hint)
path – Path to the input file containing text
reserve_hint – Optional hint for reserving space in the output vector (0 = no hint)
- Returns:
Vector containing all factors from the factorization
- Returns:
Vector of Factor objects representing the factorization