-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathByte.txt
69 lines (51 loc) · 2.62 KB
/
Byte.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
*vital/Data/List/Byte.txt* bytes-list utilities library.
Maintainer: Tsuyoshi CHO <[email protected]>
==============================================================================
CONTENTS *Vital.Data.List.Byte-contents*
INTRODUCTION |Vital.Data.List.Byte-introduction|
INTERFACE |Vital.Data.List.Byte-interface|
Functions |Vital.Data.List.Byte-functions|
==============================================================================
INTRODUCTION *Vital.Data.List.Byte-introduction*
*Vital.Data.List.Byte* is bytes |List| and other bytes-list like data converter.
==============================================================================
INTERFACE *Vital.Data.List.Byte-interface*
------------------------------------------------------------------------------
FUNCTIONS *Vital.Data.List.Byte-functions*
validate({data}) *Vital.Data.List.Byte.validate()*
returns 1 the given {data} is a |List| with its all values are
0 to 255 |Number|s.
Otherwise returns 0.
endian_convert({data}) *Vital.Data.List.Byte.endian_convert()*
Return endian converted bytes-list value.
Output little-endian as input of big-endian.
Vice versa output big-endian as input of little-endian.
Input {data} need 2 or more even count
from_string({str}) *Vital.Data.List.Byte.from_string()*
Return bytes-list from {str}.
bytes-list like: character cast to byte.
to_string({bytes}) *Vital.Data.List.Byte.to_string()*
Return string that is {bytes} cast to character.
from_hexstring({str}) *Vital.Data.List.Byte.from_hexstring()*
Return bytes-list from {str}.
bytes-list like: two hex characters decode to byte.
Also known as Base16.
to_hexstring({bytes}) *Vital.Data.List.Byte.to_hexstring()*
Return hex string that is {bytes} encode to two hex characters.
from_blob({blob}) *Vital.Data.List.Byte.from_blob()*
Return bytes-list from {blob}.
bytes-list like: |Blob| data object.
to_blob({bytes}) *Vital.Data.List.Byte.to_blob()*
Return blob that is {bytes} stored to blob structure.
from_int({int}, {bits}) *Vital.Data.List.Byte.from_int()*
Return bytes-list from {int}.
bytes-list like: {bits} bit-length int value.
Byte-order: big-endian
If you need little-endian result, use
|Vital.Data.List.Byte.endian_convert()|
to_int({bytes}) *Vital.Data.List.Byte.to_int()*
Return int that is {bytes} decode big-endian bytes value.
If you need little-endian decode work, use
|Vital.Data.List.Byte.endian_convert()|
==============================================================================
vim:tw=78:fo=tcq2mM:ts=8:ft=help:norl:noet:fen: