antikythera v0.3.0 Antikythera.TermUtil View Source
Utils for calculating the actual size of terms.
These utils traverse terms and accumulate the size of terms including the actual size of binary.
Link to this section Summary
Functions
Returns the actual size of term in bytes.
Returns whether actual size of term exceeds limit bytes.
Link to this section Functions
Returns the actual size of term in bytes.
Link to this function
size_smaller_or_equal?(term, limit)
View Sourcesize_smaller_or_equal?(term(), non_neg_integer()) :: boolean()
Returns whether actual size of term exceeds limit bytes.
This is more efficient than deciding by using size/1 because this function returns immediately after exceeding limit, not traverses the entire term.