Template Function noLZSS::factorize_stream
Defined in File factorizer_templates.hpp
Function Documentation
-
template<class Sink>
size_t noLZSS::factorize_stream(std::string_view text, Sink &&sink, size_t start_pos = 0) Advanced factorization function for in-memory text.
Factorizes a text string using the noLZSS algorithm.
This template function provides low-level access to the factorization process, allowing custom handling of factors through a sink callable.
This is a template function that provides the core factorization functionality for in-memory text. It builds a compressed suffix tree and applies the noLZSS algorithm to find all factors.
See also
factorize() for the non-template version that returns a vector
Note
This function copies the input string for suffix tree construction
Note
For large inputs, consider using factorize_file_stream() instead
- Template Parameters:
- Parameters:
text – Input text string
sink – Callable that receives each computed factor
start_pos – Position in the text to start factorization from (default: 0)
text – Input text string
sink – Callable that receives each computed factor
start_pos – Starting position for factorization (default 0)
- Returns:
Number of factors emitted
- Returns:
Number of factors emitted