Abstract:
Flexible high-speed generation and formatting of application-specified strings is available through table-based base conversion which may be integrated with custom formatting, and through printf-style functionality based on separate control string parsing and specialized format command sequence execution. Mechanisms include digit group tables for immediate output with or without separation characters, dynamic format templates, format localization and customization, funnels, digit extraction in left-to-right or right-to-left order, scaling and size estimation, leading bit identification, casting, indexing with exponent bits, division via multiplication by select constants and shifts, fractional value manipulations, batching transformations, stamping safety zones, rounding tools, JUMP and CALL avoidance, tailoring to processor characteristics and word size, conversions between various numeric types and representations, command stitching, stack parameter analysis, printf compilation, and others. Tools are also provided for web page rendering, embedded and realtime systems, various other application areas, string length determination, string copying, and other string operations.
Abstract:
Base64 encoding and decoding advances are characterized. Some embodiments rely on only a single bit shifting operation; some have no reliance on bit-shifting. Some access data source bytes with multi-byte reads, and use those data source bytes as indexes into an encoding lookup table. Some use a table with four quadrants, each of which contains a copy of the same 64 encoding values. Some use a negative value as both a counter and an index. Some exclude BSWAP instructions even with a little-endian processor. Some partition a data source into N partitions, which are then encoded or decoded concurrently. In some, partition length is based on expected processor performance. Unrolled loops, exemplary assembly language code and coding choices, division using MagicNumber multiplication, terminal null addition, encoding/decoding applications, and other examples are also presented.
Abstract:
Base64 encoding and decoding advances are characterized. Some of the described embodiments rely on only a single bit shifting operation; some have no reliance on bit-shifting. Some access data source bytes with multi-byte reads, and use those data source bytes as indexes into an encoding lookup table. Some use a table with four quadrants, each of which contains a copy of the same 64 encoding values. Some use a negative value as both a counter and an index. Some exclude BSWAP instructions even with a little-endian processor. Some partition a data source into N partitions, which are then encoded or decoded concurrently. In some, partition length is based on expected processor performance. Unrolled loops, exemplary assembly language code and coding choices, division using MagicNumber multiplication, terminal null addition, encoding/decoding applications, and other aspects of some embodiments are also presented.