b, k, ... -

The pattern documentation includes two additional format specifiers, b and k. These are currently not supported in the pattern compile, however adding them would be straightforward as they are variations on the c specifier.

In general, you can manually substitute a cN pattern where a b or k might be used (assuming fixed length field), according to the following notes.

  • b (bit streams) are "cN"-like, with N being treated as bits

    • b8 is equivalent to c1, b24 is equivalent to a c3, etc.

    • Substitution:

      • b to c: Divide N by 8.

  •  k (byte streams) are "cN"-like, with N being treated as 8 bytes

    • k1 is equivalent to c8, k3 is equivalent to a c24, etc.

    • Substitution:

      • k to c: Multiply N by 8.