Changeset 38921 in project


Ignore:
Timestamp:
08/30/20 04:41:26 (4 weeks ago)
Author:
Kon Lovett
Message:

rel 2.0.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/blob-utils

    r36714 r38921  
    88== Documentation
    99
     10=== Blob Utils
     11
     12; {{BV}} : {{(or string blob srfi-4-vector)}}
     13; {{IDX}} : {{fixnum}} ; {(<= 0 ...)}
     14
     15The inclusion of {{string}} in {{BV}} is deprecated.
     16
    1017==== Usage
    1118
     
    2027Returns a hexadecimal represenation of {{BV}}.
    2128
    22 ; {{BV}} : {{(or string blob srfi-4-vector)}}
    23 ; {{START}} : {{fixnum}} ; 0..<last>
    24 ; {{END}} : {{fixnum}} ; 0..<end>
     29; {{START}} : {{fixnum}} ; {(<= 0 ...)}
     30; {{END}} : {{fixnum}} ; {(<= START ...)}
    2531
    2632==== bytes-set-u8
     
    3036<procedure>(bytes-set-s8! BV IDX INT)</procedure>
    3137
    32 ; {{BV}} : {{(or string blob srfi-4-vector)}}
    33 ; {{IDX}} : {{fixnum}} ; 0..<last>
    3438; {{UINT}} : {{fixnum}} ; 0..(2^8)-1
    3539; {{INT}} : {{fixnum}} ; -(2^7)..(2^7)-1
     
    4145<procedure>(bytes-set-s16! BV IDX INT)</procedure>
    4246
    43 ; {{BV}} : {{(or string blob srfi-4-vector)}}
    44 ; {{IDX}} : {{fixnum}} ; 0..<last>
    4547; {{UINT}} : {{fixnum}} ; 0..(2^16)-1
    4648; {{INT}} : {{fixnum}} ; -(2^15)..(2^15)-1
     
    5254<procedure>(bytes-set-s32! BV IDX INT)</procedure>
    5355
    54 ; {{BV}} : {{(or string blob srfi-4-vector)}}
    55 ; {{IDX}} : {{fixnum}} ; 0..<last>
    5656; {{UINT}} : {{number}} ; 0..(2^32)-1
    5757; {{INT}} : {{number}} ; -(2^31)..(2^31)-1
     
    6363<procedure>(bytes-set-s64! BV IDX INT)</procedure>
    6464
    65 ; {{BV}} : {{(or string blob srfi-4-vector)}}
    66 ; {{IDX}} : {{fixnum}} ; 0..<last>
    6765; {{UINT}} : {{number}} ; 0..(2^64)-1
    6866; {{INT}} : {{number}} ; -(2^63)..(2^63)-1
     
    8583
    8684; {{BLOB}} : {{blob}}
    87 ; {{START}} : {{fixnum}} ; 0..<last>
    88 ; {{END}} : {{fixnum}} ; 0..<end>
     85; {{START}} : {{fixnum}} ; {(<= 0 ...)}
     86; {{END}} : {{fixnum}} ; {(<= 0 ...)}
    8987
    9088=== Blob Set Int
     
    200198Set integer in blob.
    201199
    202 ==== Usage
    203 
    204 <enscript language=scheme>
    205 (import pack-integer)
    206 </enscript>
    207 
    208 ==== pack-u8
    209 
    210 <procedure>(pack-u8 N [kind: KIND] [start: START]) -> (or string blob u8vector)</procedure>
    211 
    212 Returns the number {{N}} packed into an object of {{KIND}}, at position {{START}}.
    213 
    214 ; {{KIND}} : {{(or symbol (or string blob u8vector))}}
    215 ; {{START}} : {{fixnum}} ; 0..<last>
    216 
    217 ==== pack-u16
    218 
    219 <procedure>(pack-u16 N [kind: KIND] [start: START] [order: ORDER]) -> (or string blob u8vector)</procedure>
    220 
    221 Returns the number {{N}} packed into an object of {{KIND}}, at position {{START}}.
    222 
    223 ; {{KIND}} : {{(or symbol (or string blob u8vector))}}
     200; {{PACK}} : {{(or string blob u8vector)}}
     201; {{KIND}} : {{(or symbol PACK)}} ; {{symbol}} from {{(string blob u8vector)}}
    224202; {{START}} : {{fixnum}} ; {{(<= 0 ...)}}
    225203; {{ORDER}} : {{symbol}} ; {{big-endian be big little-endian le little}}
    226204
     205The pack functions are pure or mutating depending on the {{KIND}}.
     206
     207The inclusion of {{string}} in {{KIND}} & {{PACK}} is deprecated.
     208
     209==== Usage
     210
     211<enscript language=scheme>
     212(import pack-integer)
     213</enscript>
     214
     215==== pack-u8
     216
     217<procedure>(pack-u8 N [kind: KIND] [start: START]) -> PACK</procedure>
     218
     219Returns the number {{N}} packed into an object of {{KIND}}, at position {{START}}.
     220
     221==== pack-u16
     222
     223<procedure>(pack-u16 N [kind: KIND] [start: START] [order: ORDER]) -> PACK</procedure>
     224
     225Returns the number {{N}} packed into an object of {{KIND}}, at position {{START}}.
     226
    227227==== pack-u32
    228228
    229 <procedure>(pack-u32 N [kind: KIND] [start: START] [order: ORDER]) -> (or string blob u8vector)</procedure>
    230 
    231 Returns the number {{N}} packed into an object of {{KIND}}, at position {{START}}.
    232 
    233 ; {{KIND}} : {{(or symbol (or string blob u8vector))}}
    234 ; {{START}} : {{fixnum}} ; {{(<= 0 ...)}}
    235 ; {{ORDER}} : {{symbol}} ; {{big-endian be big little-endian le little}}
     229<procedure>(pack-u32 N [kind: KIND] [start: START] [order: ORDER]) -> PACK</procedure>
     230
     231Returns the number {{N}} packed into an object of {{KIND}}, at position {{START}}.
    236232
    237233==== pack-u64
    238234
    239 <procedure>(pack-u64 N [kind: KIND] [start: START] [order: ORDER]) -> (or string blob u8vector)</procedure>
    240 
    241 Returns the number {{N}} packed into an object of {{KIND}}, at position {{START}}.
    242 
    243 ; {{KIND}} : {{(or symbol (or string blob u8vector))}}
    244 ; {{START}} : {{fixnum}} ; {{(<= 0 ...)}}
    245 ; {{ORDER}} : {{symbol}} ; {{big-endian be big little-endian le little}}
     235<procedure>(pack-u64 N [kind: KIND] [start: START] [order: ORDER]) -> PACK</procedure>
     236
     237Returns the number {{N}} packed into an object of {{KIND}}, at position {{START}}.
    246238
    247239==== pack-integer
    248240
    249 <procedure>(pack-integer N [kind: KIND] [start: START] [order: ORDER]) -> (or string blob u8vector)</procedure>
    250 
    251 Returns the number {{N}} packed into an object of {{KIND}}, at position {{START}}.
    252 
    253 ; {{KIND}} : {{(or symbol (or string blob u8vector))}}
    254 ; {{START}} : {{fixnum}} ; {{(<= 0 ...)}}
    255 ; {{ORDER}} : {{symbol}} ; {{big-endian be big little-endian le little}}
     241<procedure>(pack-integer N [kind: KIND] [start: START] [order: ORDER]) -> PACK</procedure>
     242
     243Returns the number {{N}} packed into an object of {{KIND}}, at position {{START}}.
    256244
    257245
     
    278266== Version history
    279267
     268; 2.0.1 : Fix {{pack-integer}} single-byte case.
    280269; 2.0.0 : CHICKEN 5 release.
    281270; 1.2.0 : Added {{blob-utils}} module.
     
    290279== License
    291280
    292 Copyright (C) 2012-2018 Kon Lovett.  All rights reserved.
     281Copyright (C) 2012-2020 Kon Lovett.  All rights reserved.
    293282
    294283Permission is hereby granted, free of charge, to any person obtaining a
Note: See TracChangeset for help on using the changeset viewer.