Apply PIE to nghttpx
[platform/upstream/nghttp2.git] / third-party / mruby / mrbgems / mruby-pack / README.md
1 mruby-pack (pack / unpack)
2 =========
3
4 mruby-pack provides `Array#pack` and `String#unpack` for mruby.
5
6
7 ## Installation
8 Add the line below into your `build_config.rb`:
9
10 ```
11   conf.gem :github => 'iij/mruby-pack'
12 ```
13
14 There 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
51 Copyright (c) 2012 Internet Initiative Japan Inc.
52
53 Permission is hereby granted, free of charge, to any person obtaining a 
54 copy of this software and associated documentation files (the "Software"), 
55 to deal in the Software without restriction, including without limitation 
56 the rights to use, copy, modify, merge, publish, distribute, sublicense, 
57 and/or sell copies of the Software, and to permit persons to whom the 
58 Software is furnished to do so, subject to the following conditions:
59
60 The above copyright notice and this permission notice shall be included in 
61 all copies or substantial portions of the Software.
62
63 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
64 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
65 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
66 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
67 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
68 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
69 DEALINGS IN THE SOFTWARE.
70