toChunks -package:streamly-process
O(n) Convert a lazy
Text into a list of strict
Texts.
O(c) Convert a byte stream into a stream of individual strict
bytestrings. This of course exposes the internal chunk structure.
This routine exposes the inner structure of the lazy number.
Chunk a non-negative integer into words, least significatn first
The raw
Text data that the
Rope is built from
Split
Pandoc into
Chunks, e.g. for conversion into a set
of HTML pages or EPUB chapters.
Variant of
reverseCommitsOntoChunks that does not reverse the
order of the commits. Since commits are built backwards by consing,
this means that the chunks appended to the front will be backwards.
Within each chunk, however, the bytes will be in the correct order.
Unlike
reverseCommitsOntoChunks, this function is not tail
recursive.
Cons the chunks from a list of Commits onto an initial
Chunks list (this argument is often ChunksNil). This
reverses the order of the chunks, which is desirable since builders
assemble Commits with the chunks backwards. This performs an
in-place shrink and freezes any mutable byte arrays it encounters.
Consequently, these must not be reused.