Changeset 29263 in project


Ignore:
Timestamp:
06/27/13 23:36:28 (7 years ago)
Author:
svnwiki
Message:

Anonymous wiki edit for IP [85.21.8.51]: 1.11 zero-extending option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/bitstring

    r29255 r29263  
    139139<procedure>(string->bitstring str)</procedure>
    140140
    141 <procedure>(bitstring->u8vector bitstring)</procedure>
     141<procedure>(bitstring->blob bitstring [zero-extendind])</procedure>
     142<procedure>(bitstring->u8vector bitstring [zero-extendind])</procedure>
    142143
    143144If bitstring not aligned on 8 bit boundary rest bits extending with zeroes.
    144 
    145 <bitstring 0 9 (1 1 1 1 1 1 1 1 1)> turn into #u8(255 1)
    146 
    147 <procedure>(bitstring->blob bitstring)</procedure>
     145{{zero-extendind}} optional argument, {{'left}} you get an integer value of rest bit,
     146{{'right}} give you internal bitstring repsesentation where bits follow one by one, default value {{'left}}.
     147
     148zero-extending to left
     149<bitstring 0 9 (1 1 1 1 1 1 1 1 1)> turn into #u8(#xff #x01)
     150
     151zero-extending to right, this might be usefull when you want to store your string to the disc and then load back.
     152<bitstring 0 9 (1 1 1 1 1 1 1 1 1)> turn into #u8(#xff #x80)
    148153
    149154== Examples
     
    369374== Version History
    370375
     3761.11 zero-extending option for bitstring->u8vector,bitstring->blob
     377
    3713781.1 Change a bit naming style. Speed-up with -O3 level compilation.
    372379
Note: See TracChangeset for help on using the changeset viewer.