Welcome to the CHICKEN Scheme pasting service

notes on binary data added by r1b on Thu Apr 18 00:46:36 2019

; packing a u32 (little endian) for output to port

; using blobs and srfi-4

(define (pack-u32 n)
 (byte-blob->string (endian-blob-object (u32vector->endian-blob (u32vector n) LSB))))

; using strings and srfi-33

(define (pack-u32 n)
  (list->string (map integer->char
                     (list (bitwise-and n #x000000ff)
                           (arithmetic-shift (bitwise-and n #x0000ff00) -8)
                           (arithmetic-shift (bitwise-and n #x00ff0000) -16)
                           (arithmetic-shift (bitwise-and n #xff000000) -24)))))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which egg provides `hash-table-ref'?
Visually impaired? Let me spell it for you (wav file) download WAV