axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
axlBinaryStack* axl_binary_stack_new ( void  )

Allows to create a compact binary state stack.

To stack is designed to store boolean values in an efficient way. In idea behind this structure is that storing 10 boolean axl_true values only holds a node, with the axl_true value and the count of items that previously was signaled with the same value.

The intention is to compact a binary succession of data into a list of touples signaling the state and the number of times it was signaled.

This structure is meant to be more efficient than a plain axlStack but there is a case where is not more efficient, that is, when all stored boolean values alternates.

A newly allocated binary stack. Push boolean values with axl_binary_stack_push. Pop previous stored value with axl_binary_stack_pop. Once finished, use axl_binary_stack_free to free the binary stack.

References axl_free(), axl_new, and axl_stack_new().