node-dextrin - v0.1.0
    Preparing search index...

    Function floatHead

    • Major 7's float marker (additional info 27, "double follows") — deliberately not head(7, 27n): for every other major type, head's job is "encode this integer using the fewest bytes CBOR allows," but major 7's additional-info value of 27 has to mean literally "float64 follows," not "the number 27, shortest form" — head(7, 27n) would emit <<7::3, 24::5, 27::8>> (two bytes) instead of the required <<7::3, 27::5>> (one byte), a genuinely different, non-conformant encoding. Same bug Dextrin.Binary.Encoder itself once had — see its own float_head/0 comment.

      Returns Buffer<ArrayBufferLike>