⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
ri
/
3.0.0
/
system
/
Array
/
Edit File: pack-i.ri
U:RDoc::AnyMethod[iI" pack:ETI"Array#pack;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"JPacks the contents of <i>arr</i> into a binary sequence according to ;TI"Dthe directives in <i>aTemplateString</i> (see the table below) ;TI"DDirectives ``A,'' ``a,'' and ``Z'' may be followed by a count, ;TI"Awhich gives the width of the resulting field. The remaining ;TI"Fdirectives also may take a count, indicating the number of array ;TI"6elements to convert. If the count is an asterisk ;TI"@(``<code>*</code>''), all remaining array elements will be ;TI"Econverted. Any of the directives ``<code>sSiIlL</code>'' may be ;TI"7followed by an underscore (``<code>_</code>'') or ;TI"Aexclamation mark (``<code>!</code>'') to use the underlying ;TI"Jplatform's native size for the specified type; otherwise, they use a ;TI"Cplatform-independent size. Spaces are ignored in the template ;TI"$string. See also String#unpack.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [ I"a = [ "a", "b", "c" ] ;TI"n = [ 65, 66, 67 ] ;TI"(a.pack("A3A3A3") #=> "a b c " ;TI":a.pack("a3a3a3") #=> "a\000\000b\000\000c\000\000" ;TI""n.pack("ccc") #=> "ABC" ;T:@format0o; ; [I"FIf <i>aBufferString</i> is specified and its capacity is enough, ;TI"2+pack+ uses it as the buffer and returns it. ;TI"NWhen the offset is specified by the beginning of <i>aTemplateString</i>, ;TI",the result is filled after the offset. ;TI"NIf original contents of <i>aBufferString</i> exists and it's longer than ;TI"Rthe offset, the rest of <i>offsetOfBuffer</i> are overwritten by the result. ;TI"AIf it's shorter, the gap is filled with ``<code>\0</code>''.;T@o; ; [I"LNote that ``buffer:'' option does not guarantee not to allocate memory ;TI"Hin +pack+. If the capacity of <i>aBufferString</i> is not enough, ;TI"+pack+ allocates memory.;T@o; ; [I"Directives for +pack+.;T@o;; [`I"Integer | Array | ;TI"'Directive | Element | Meaning ;TI"R---------------------------------------------------------------------------- ;TI">C | Integer | 8-bit unsigned (unsigned char) ;TI"IS | Integer | 16-bit unsigned, native endian (uint16_t) ;TI"IL | Integer | 32-bit unsigned, native endian (uint32_t) ;TI"IQ | Integer | 64-bit unsigned, native endian (uint64_t) ;TI"QJ | Integer | pointer width unsigned, native endian (uintptr_t) ;TI"@ | | (J is available since Ruby 2.3.) ;TI" | | ;TI":c | Integer | 8-bit signed (signed char) ;TI"Fs | Integer | 16-bit signed, native endian (int16_t) ;TI"Fl | Integer | 32-bit signed, native endian (int32_t) ;TI"Fq | Integer | 64-bit signed, native endian (int64_t) ;TI"Nj | Integer | pointer width signed, native endian (intptr_t) ;TI"@ | | (j is available since Ruby 2.3.) ;TI" | | ;TI"=S_ S! | Integer | unsigned short, native endian ;TI";I I_ I! | Integer | unsigned int, native endian ;TI"<L_ L! | Integer | unsigned long, native endian ;TI"PQ_ Q! | Integer | unsigned long long, native endian (ArgumentError ;TI"G | | if the platform has no long long type.) ;TI"H | | (Q_ and Q! is available since Ruby 2.1.) ;TI"FJ! | Integer | uintptr_t, native endian (same with J) ;TI"A | | (J! is available since Ruby 2.3.) ;TI" | | ;TI";s_ s! | Integer | signed short, native endian ;TI"9i i_ i! | Integer | signed int, native endian ;TI":l_ l! | Integer | signed long, native endian ;TI"Nq_ q! | Integer | signed long long, native endian (ArgumentError ;TI"G | | if the platform has no long long type.) ;TI"H | | (q_ and q! is available since Ruby 2.1.) ;TI"Ej! | Integer | intptr_t, native endian (same with j) ;TI"A | | (j! is available since Ruby 2.3.) ;TI" | | ;TI"IS> s> S!> s!> | Integer | same as the directives without ">" except ;TI"*L> l> L!> l!> | | big endian ;TI"<I!> i!> | | (available since Ruby 1.9.3) ;TI"3Q> q> Q!> q!> | | "S>" is same as "n" ;TI"3J> j> J!> j!> | | "L>" is same as "N" ;TI" | | ;TI"IS< s< S!< s!< | Integer | same as the directives without "<" except ;TI"-L< l< L!< l!< | | little endian ;TI"<I!< i!< | | (available since Ruby 1.9.3) ;TI"3Q< q< Q!< q!< | | "S<" is same as "v" ;TI"3J< j< J!< j!< | | "L<" is same as "V" ;TI" | | ;TI"Pn | Integer | 16-bit unsigned, network (big-endian) byte order ;TI"PN | Integer | 32-bit unsigned, network (big-endian) byte order ;TI"Ov | Integer | 16-bit unsigned, VAX (little-endian) byte order ;TI"OV | Integer | 32-bit unsigned, VAX (little-endian) byte order ;TI" | | ;TI"/U | Integer | UTF-8 character ;TI"6w | Integer | BER-compressed integer ;TI" ;TI"Float | Array | ;TI"&Directive | Element | Meaning ;TI"Q--------------------------------------------------------------------------- ;TI">D d | Float | double-precision, native format ;TI">F f | Float | single-precision, native format ;TI"IE | Float | double-precision, little-endian byte order ;TI"Ie | Float | single-precision, little-endian byte order ;TI"PG | Float | double-precision, network (big-endian) byte order ;TI"Pg | Float | single-precision, network (big-endian) byte order ;TI" ;TI"String | Array | ;TI"&Directive | Element | Meaning ;TI"Q--------------------------------------------------------------------------- ;TI"UA | String | arbitrary binary string (space padded, count is width) ;TI"Ta | String | arbitrary binary string (null padded, count is width) ;TI"NZ | String | same as ``a'', except that null is added with * ;TI"5B | String | bit string (MSB first) ;TI"5b | String | bit string (LSB first) ;TI"=H | String | hex string (high nibble first) ;TI"<h | String | hex string (low nibble first) ;TI"0u | String | UU-encoded string ;TI"QM | String | quoted printable, MIME encoding (see also RFC2045) ;TI"N | | (text mode but input must use LF and output LF) ;TI"Cm | String | base64 encoded string (see RFC 2045) ;TI"T | | (if count is 0, no line feed are added, see RFC 4648) ;TI"L | | (count specifies input bytes between each LF, ;TI"E | | rounded down to nearest multiple of 3) ;TI"KP | String | pointer to a structure (fixed-length string) ;TI"Bp | String | pointer to a null-terminated string ;TI" ;TI"Misc. | Array | ;TI"&Directive | Element | Meaning ;TI"Q--------------------------------------------------------------------------- ;TI"9@ | --- | moves to absolute position ;TI"-X | --- | back up a byte ;TI"'x | --- | null byte;T; 0: @fileI"pack.rb;T:0@omit_headings_from_table_of_contents_below0I"varr.pack( aTemplateString ) -> aBinaryString arr.pack( aTemplateString, buffer: aBufferString ) -> aBufferString ;T0[ I"(fmt, buffer: nil);T@�FI" Array;TcRDoc::NormalClass00
Simpan