source: EcnlProtoTool/trunk/mrbgems/mruby-pack/README.md@ 331

Last change on this file since 331 was 331, checked in by coas-nagasima, 6 years ago

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

File size: 2.7 KB
Line 
1mruby-pack (pack / unpack)
2=========
3
4mruby-pack provides `Array#pack` and `String#unpack` for mruby.
5
6
7## Installation
8Add the line below into your `build_config.rb`:
9
10```
11 conf.gem :github => 'iij/mruby-pack'
12```
13
14There is no dependency on other mrbgems.
15
16
17## Supported template string
18 - A : arbitrary binary string (space padded, count is width)
19 - a : arbitrary binary string (null padded, count is width)
20 - C : 8-bit unsigned (unsigned char)
21 - c : 8-bit signed (signed char)
22 - D, d: 64-bit float, native format
23 - E : 64-bit float, little endian byte order
24 - e : 32-bit float, little endian byte order
25 - F, f: 32-bit float, native format
26 - G : 64-bit float, network (big-endian) byte order
27 - g : 32-bit float, network (big-endian) byte order
28 - H : hex string (high nibble first)
29 - h : hex string (low nibble first)
30 - I : unsigned integer, native endian (`unsigned int` in C)
31 - i : signed integer, native endian (`int` in C)
32 - L : 32-bit unsigned, native endian (`uint32_t`)
33 - l : 32-bit signed, native endian (`int32_t`)
34 - m : base64 encoded string (see RFC 2045, count is width)
35 - N : 32-bit unsigned, network (big-endian) byte order
36 - n : 16-bit unsigned, network (big-endian) byte order
37 - Q : 64-bit unsigned, native endian (`uint64_t`)
38 - q : 64-bit signed, native endian (`int64_t`)
39 - S : 16-bit unsigned, native endian (`uint16_t`)
40 - s : 16-bit signed, native endian (`int16_t`)
41 - U : UTF-8 character
42 - V : 32-bit unsigned, VAX (little-endian) byte order
43 - v : 16-bit unsigned, VAX (little-endian) byte order
44 - x : null byte
45 - Z : same as "a", except that null is added with *
46
47
48
49## License
50
51Copyright (c) 2012 Internet Initiative Japan Inc.
52
53Permission is hereby granted, free of charge, to any person obtaining a
54copy of this software and associated documentation files (the "Software"),
55to deal in the Software without restriction, including without limitation
56the rights to use, copy, modify, merge, publish, distribute, sublicense,
57and/or sell copies of the Software, and to permit persons to whom the
58Software is furnished to do so, subject to the following conditions:
59
60The above copyright notice and this permission notice shall be included in
61all copies or substantial portions of the Software.
62
63THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
64IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
65FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
66AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
67LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
68FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
69DEALINGS IN THE SOFTWARE.
70
Note: See TracBrowser for help on using the repository browser.