Codec Library API - brombres/Rogue GitHub Wiki
extends Object
incorporates CommonCompoundMethods
| Signature | Return Type | Description |
|---|---|---|
| create( bitmask:Int, left_shift_for_argb:Int ) | BMPBitField |
| Name | Type | Description |
|---|---|---|
| bitmask | Int | |
| left_shift_for_argb | Int |
| Signature | Return Type | Description |
|---|---|---|
| bit_count() | Int | |
| bit_shift() | Int | |
| description() | String | |
| operator<>( other:BMPBitField ) | Int | |
| operator==( other:BMPBitField ) | Logical | |
| print_to( buffer:PrintWriter ) | ||
| reader( [next=null:BMPColorComponentReader] ) | BMPColorComponentReader | |
| to<<Object>>() | Boxed<<BMPBitField>> | |
| to<<String>>() | String | |
| to<<Variant>>() | Variant | |
| type_info() | TypeInfo |
extends Object
| Name | Type | Description |
|---|---|---|
| bits | Int | |
| next | BMPColorComponentReader | |
| shift | Int |
| Signature | Return Type | Description |
|---|---|---|
| init( bitfield:BMPBitField, [next=null:BMPColorComponentReader] ) | ||
| init( bits:Int, shift:Int, [next=null:BMPColorComponentReader] ) | ||
| read( reader:BitReader, [argb=0:Int] ) | Int |
extends Object
| Signature | Return Type | Description |
|---|---|---|
| decode( encoded_bytes:Byte[], [bitmap=null:Bitmap] ) | Bitmap |
extends BitReader
| Name | Type | Description |
|---|---|---|
| bit_buffer | Int64 | |
| buffer_count | Int | |
| input | Reader<<Byte>> | |
| position | Int |
| Signature | Return Type | Description |
|---|---|---|
| read_int24_lh() | Int | |
| read_int32_lh() | Int | |
| read_uint16_lh() | Int |
incorporates CommonCompoundMethods
| Category | Value | Description |
|---|---|---|
| BITMAPCOREHEADER | 12 | |
| OS22XBITMAPHEADER16 | 16 | |
| OS22XBITMAPHEADER64 | 64 | |
| BITMAPINFOHEADER | 40 | |
| BITMAPV2INFOHEADER | 52 | |
| BITMAPV3INFOHEADER | 56 | |
| BITMAPV4HEADER | 108 | |
| BITMAPV5HEADER | 124 |
| Name | Type | Description |
|---|---|---|
| categories | BMPVersion[] |
| Signature | Return Type | Description |
|---|---|---|
| create( name:String ) | BMPVersion | |
| create( value:Int ) | BMPVersion |
| Name | Type | Description |
|---|---|---|
| value | Int |
| Signature | Return Type | Description |
|---|---|---|
| description() | String | |
| hashcode() | Int | |
| name() | String | |
| operator?() | Logical | |
| operator<>( other:BMPVersion ) | Int | |
| operator==( other:BMPVersion ) | Logical | |
| print_to( buffer:PrintWriter ) | ||
| to<<Int>>() | Int | |
| to<<Object>>() | Object | |
| to<<String>>() | String | |
| to<<Variant>>() | Variant | |
| type_info() | TypeInfo |
extends Object
| Name | Type | Description |
|---|---|---|
| backlinks | Int32[] | |
| counts | Byte[] | |
| data | Byte[] | |
| literals | Byte[] | |
| max_jumps | Int | |
| max_length | Int | |
| most_recent | Int32[] | |
| next_32_bits | Int32[] | |
| offsets | Byte[] | |
| output_bytes | Byte[] |
| Signature | Return Type | Description |
|---|---|---|
| init() | ||
| compress( data:Byte[] ) | Byte[] | |
| compress( data:String ) | Byte[] | |
| compress( file:File ) | Byte[] | |
| find_longest_prior_sequence( limit:Int32 ) | (Int32,Int32) | |
| find_next_repeat_sequence( i1:Int32 ) | (Int32,Int32,Int32) | |
| on_literal_sequence( i1:Int32, count:Int32 ) | ||
| on_repeat_sequence( i1:Int32, i0:Int32, count:Int32 ) | ||
| post_process( bytes:Byte[] ) | Byte[] | |
| post_process_counts( literals:Byte[] ) | Byte[] | |
| post_process_literals( counts:Byte[] ) | Byte[] | |
| post_process_offsets( offsets:Byte[] ) | Byte[] | |
| sequence_length( i1:Int32, i2:Int32 ) | Int32 | |
| write_section( bytes:Byte[], writer:DataWriter ) |
extends Object
| Signature | Return Type | Description |
|---|---|---|
| decompress( data:Byte[] ) | Byte[] | |
| decompress( file:File ) | Byte[] | |
| preprocess( bytes:Byte[] ) | Byte[] | |
| preprocess_counts( bytes:Byte[] ) | Byte[] | |
| preprocess_literals( bytes:Byte[] ) | Byte[] | |
| preprocess_offsets( bytes:Byte[] ) | Byte[] | |
| read_stored_bytes( reader:DataReader ) | Byte[] |
incorporates CommonCompoundMethods
USAGE
uses Codec/CRC32
local crc32 = CRC32(bytes) # faster
OR
local crc32 = CRC32()
crc32.add( bytes ) # faster
OR
crc32.add( forEach in bytes ) # slower
println crc32->Int32
println crc32->String
| Name | Type | Description |
|---|---|---|
| crc32_table | Int32[] |
| Signature | Return Type | Description |
|---|---|---|
| create( [hash=0:Int32] ) | CRC32 | |
| create( bytes:Byte[] ) | CRC32 | |
| create( data:Int32[] ) | CRC32 |
| Name | Type | Description |
|---|---|---|
| hash | Int32 |
| Signature | Return Type | Description |
|---|---|---|
| add( byte:Int32 ) | ||
| add( bytes:Byte[] ) | ||
| description() | String | |
| operator==( other:CRC32 ) | Logical | |
| print_to( buffer:PrintWriter ) | ||
| to<<Int32>>() | Int32 | |
| to<<Object>>() | Boxed<<CRC32>> | |
| to<<String>>() | String | |
| to<<Variant>>() | Variant | |
| type_info() | TypeInfo |
extends Object
| Name | Type | Description |
|---|---|---|
| byte_node_lookup | HuffmanNode[] | |
| data | Int32[] | |
| large_node_lookup | [Int32:HuffmanNode] | |
| literal_bits | Int32 | |
| max_value | Int32 | |
| min_value | Int32 | |
| nodes | HuffmanNode[] | |
| root | HuffmanNode |
| Signature | Return Type | Description |
|---|---|---|
| add( bytes:Byte[] ) | ||
| add( bytes:Byte[], i1:Int32, count:Int32 ) | ||
| add( value:Int32 ) | ||
| add( values:Int32[] ) | ||
| add( values:Int32[], i1:Int32, count:Int32 ) | ||
| compression() | Real | |
| construct() | HuffmanNode | |
| deconstruct() | ||
| register( value:Int32, node:HuffmanNode ) | Only necessary if you want to pass in an extended HuffmanNode to control reading and writing. | |
| root() | HuffmanNode | |
| size() | Int32 | |
| write( writer:BitWriter ) |
extends Object
| Name | Type | Description |
|---|---|---|
| bits | Int32 | |
| count | Int32 | |
| left | HuffmanNode | |
| pattern | Int32 | |
| right | HuffmanNode | |
| value | Int32 |
| Signature | Return Type | Description |
|---|---|---|
| init( left:HuffmanNode, right:HuffmanNode ) | ||
| init( reader:BitReader, value_bits:Int32, [pattern=0:Int32], [bits=0:Int32] ) | ||
| init( value:Int32 ) | ||
| assign_bit_patterns( [pattern=0:Int32], [bits=0:Int32] ) | ||
| bit_size( literal_bits:Int32 ) | Int64 | |
| collect_leaves( nodes:HuffmanNode[] ) | ||
| read( reader:BitReader ) | Int32 | |
| to<<String>>() | String | |
| write( writer:BitWriter ) | ||
| write_definition( writer:BitWriter, literal_bits:Int32 ) |
extends Object
incorporates Reader<<$DataType>>
| Name | Type | Description |
|---|---|---|
| literal_bits | Int32 | |
| next | Int32? | |
| position | Int | |
| reader | BitReader | |
| remaining | Int32 | |
| root | HuffmanNode |
| Signature | Return Type | Description |
|---|---|---|
| init( bytes:Byte[] ) | ||
| init( bytes:Byte[], i1:Int32, count:Int32 ) | ||
| init( file:File ) | ||
| init( reader:BitReader ) | ||
| close() | ||
| has_another() | Logical | |
| on_end_use() | ||
| on_use() | HuffmanReader | |
| peek() | Int32 | |
| position() | Int | |
| queue_next() | ||
| read() | Int32 | |
| read_another() | Int32? | |
| read_definition() | ||
| read( buffer:Int32[], limit:Int ) | Int | |
| read( bytes:Byte[], [max=0:Int32] ) | Byte[] | |
| read( file:File ) | Read values and store them into the given file | |
| read_bytes( [max=0:Int32] ) | Byte[] | |
| read_string( [max=0:Int32] ) | String | |
| reset() | ||
| seek( pos:Int ) | ||
| skip( n:Int ) | ||
| to<<Int32[]>>() | Int32[] | |
| to<<String>>() | String |
extends Object
incorporates Writer<<$DataType>>
| Name | Type | Description |
|---|---|---|
| buffer | Int32[] | |
| builder | HuffmanBuilder | |
| granularity | Int |
The proportions of most-frequent and least-frequent bytes can change over the course of a dataset so HuffmanWriter buffers values and checks every 'granularity' number of values for a worsening compression ratio and writes out the buffer using the best chunk size. 'granularity' is automatically adjusted by write(Byte[]) and write(Int32[]) to be 1/256th of the total data size. In other words, if granularity is set to 1024 then the compression ratio will be evaluated at buffer sizes 1024, 2048, 3072, etc. If the compression ratio improves for 2048 and 3072 but gets worse for 4096, 3072 values will be written out and a new Huffman Tree will be created with the remaining 1024 bytes. |
| output_bytes | Byte[] | |
| position | Int | |
| prev_compression | Real | |
| writer | BitWriter |
| Signature | Return Type | Description |
|---|---|---|
| init() | ||
| init( file:File ) | ||
| init( output_bytes:Byte[] ) | ||
| init( writer:BitWriter ) | ||
| init( writer:Writer<<Byte>> ) | ||
| adjust_granularity( total_count:Int32 ) | Optional | |
| close() | ||
| flush() | ||
| on_cleanup() | ||
| on_use() | HuffmanWriter | |
| on_end_use( err:Exception ) | Exception | |
| position() | Int | |
| reset() | ||
| seek_end() | ||
| seek( pos:Int ) | ||
| skip( n:Int ) | ||
| write_buffered_chunk() | ||
| write( bytes:Byte[] ) | ||
| write( file:File ) | ||
| write( value:Int32 ) | ||
| write( value:String ) | ||
| write( values:Int32[] ) |
extends Object
| Name | Type | Description |
|---|---|---|
| @native63 | RogueCNativeProperty | |
| encoded_bytes | Byte[] | |
| error_handler | JPEGErrorHandler | |
| image_height | Int32 | |
| image_width | Int32 |
| Signature | Return Type | Description |
|---|---|---|
| decode( encoded_bytes:Byte[], [dest_bitmap=null:Bitmap], &make_power_of_two ) | Bitmap | |
| image_size() | XY |
extends Object
| Name | Type | Description |
|---|---|---|
| @native81 | RogueCNativeProperty | |
| error_handler | JPEGErrorHandler |
| Signature | Return Type | Description |
|---|---|---|
| encode( bitmap:Bitmap, [encoded_bytes=null:Byte[]], [quality=75:Int32] ) | Byte[] |
incorporates CommonCompoundMethods
| Name | Type | Description |
|---|---|---|
| @native67 | RogueCNativeProperty | |
| @native68 | RogueCNativeProperty |
| Signature | Return Type | Description |
|---|---|---|
| description() | String | |
| operator==( other:JPEGErrorHandler ) | Logical | |
| print_to( buffer:PrintWriter ) | ||
| to<<Object>>() | Boxed<<JPEGErrorHandler>> | |
| to<<String>>() | String | |
| to<<Variant>>() | Variant | |
| type_info() | TypeInfo |
extends String
| Signature | Return Type | Description |
|---|---|---|
| load( file:File, [error_log=null:PrintWriter] ) | Variant | |
| parse( file:File, [error_log=null:PrintWriter] ) | Variant | |
| parse( json:String, [error_log=null:PrintWriter] ) | Variant | |
| save( value:Variant, file:File, [formatted=false:Logical], [omit_commas=false:Logical] ) | Logical |
| Name | Type | Description |
|---|---|---|
| at_newline | Logical | |
| count | Int | in whole characters |
| cursor_index | Int | in characters |
| cursor_offset | Int | in bytes |
| data | Byte[] | |
| hashcode | Int | |
| indent | Int | |
| is_ascii | Logical | makes indexing easier if true |
| is_immutable | Logical |
| Signature | Return Type | Description |
|---|---|---|
| parse( [error_log=null:PrintWriter] ) | Variant |
extends Error
| Name | Type | Description |
|---|---|---|
| message | String | |
| stack_trace | StackTrace |
| Signature | Return Type | Description |
|---|---|---|
| init( message:String ) |
extends Object
| Name | Type | Description |
|---|---|---|
| reader | Scanner |
| Signature | Return Type | Description |
|---|---|---|
| init( file:File ) | ||
| init( json:String ) | ||
| init( reader:Scanner ) | ||
| consume_spaces() | ||
| consume_whitespace() | ||
| consume_whitespace_and_eols() | ||
| consume( ch:Character ) | Logical | |
| has_another() | Logical | |
| next_is_identifier() | Logical | |
| next_is_number() | Logical | |
| next_is( ch:Character ) | Logical | |
| parse_hex_quad() | Character | |
| parse_identifier() | String | |
| parse_number() | Variant | |
| parse_string() | String | |
| parse_value() | Variant | |
| parse_list( [open_ch='[':Character], [close_ch=']':Character] ) | Variant | |
| parse_table( [open_ch='{':Character], [close_ch='}':Character] ) | Variant | |
| peek() | Character | |
| read() | Character |
extends Object
| Name | Type | Description |
|---|---|---|
| @native64 | RogueCNativeProperty | |
| @native65 | RogueCNativeProperty | |
| @native66 | RogueCNativeProperty | |
| image_height | Int32 | |
| image_width | Int32 | |
| reader | ListReader<<Byte>> |
| Signature | Return Type | Description |
|---|---|---|
| decode( encoded_bytes:Byte[], &make_power_of_two ) | Bitmap | |
| image_size() | XY |
extends Object
| Name | Type | Description |
|---|---|---|
| @native82 | RogueCNativeProperty | |
| @native83 | RogueCNativeProperty | |
| @native84 | RogueCNativeProperty | |
| encoded_bytes | Byte[] |
| Signature | Return Type | Description |
|---|---|---|
| encode( bitmap:Bitmap, [encoded_bytes=null:Byte[]] ) | Byte[] |
extends Object
EXAMPLE USAGE
uses Codec/SHA
println SHA.sha256( "" )
# E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
println SHA.sha256( "hello world" )
# B94D27B9934D3E08A52E52D7DA7DABFAC484EFE37A5380EE9088F7ACE2EFCDE9
println SHA.sha256( Byte[][...] )
println SHA.sha256( File(...) )
| Name | Type | Description |
|---|---|---|
| k | Int32[] | Round constants (first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311) |
| Signature | Return Type | Description |
|---|---|---|
| sha256( bytes:Byte[] ) | Byte[] | |
| sha256( data_reader:Reader<<Byte>>, byte_count:Int32 ) | Byte[] |
Note 1: All variables are 32 bit unsigned integers and addition is calculated modulo 232 Note 2: For each round, there is one round constant k[i] and one entry in the message schedule array w[i], 0 ≤ i ≤ 63 Note 3: The compression function uses 8 working variables, a through h Note 4: Big-endian convention is used when expressing the constants in this pseudocode, and when parsing message block data from bytes to words, for example, the first word of the input message "abc" after padding is 0x61626380 |
| sha256( file:File ) | Byte[] | |
| sha256( st:String ) | Byte[] |
extends Object
incorporates Reader<<$DataType>>
| Name | Type | Description |
|---|---|---|
| byte_position | Int | |
| bytes_remaining | Int | |
| data | Reader<<Byte>> | |
| data_count | Int | |
| next_result | Int32? | |
| padding | Byte[] | |
| position | Int |
| Signature | Return Type | Description |
|---|---|---|
| init( data:Byte[] ) | ||
| init( data:Reader<<Byte>>, data_count:Int ) | Pre-processing (Padding) begin with the original message of length L bits append a single '1' bit append K '0' bits, where K is the minimum number >= 0 such that L + 1 + K + 64 is a multiple of 512 append L as a 64-bit big-endian integer, making the total post-processed length a multiple of 512 bits such that the bits in the message are [L data bits, 1, K zero bits, L in 64 bits] = k*512 total bits | |
| close() | ||
| has_another() | Logical | |
| on_end_use() | ||
| on_use() | SHA256DataReader | |
| peek() | Int32 | |
| position() | Int | |
| prepare_next_result() | ||
| read() | Int32 | |
| read_byte() | Int32 | |
| read( buffer:Int32[], limit:Int ) | Int | |
| reset() | ||
| seek( pos:Int ) | ||
| skip( n:Int ) | ||
| to<<Int32[]>>() | Int32[] | |
| to<<String>>() | String |
extends Object
incorporates Recyclable
| Name | Type | Description |
|---|---|---|
| data | Byte[] |
| Signature | Return Type | Description |
|---|---|---|
| init() | ||
| init( text:String ) | ||
| init( utf16_bytes:Byte[] ) | ||
| init( wchar_data:RogueWordPointer ) | ||
| on_recycle() | ||
| to<<String>>() | String |
extends Object
| Name | Type | Description |
|---|---|---|
| id_list | Variant |
| Signature | Return Type | Description |
|---|---|---|
| init( info:Variant ) | ||
| get( index_string:String ) | Variant |
extends Object
| Name | Type | Description |
|---|---|---|
| id_list | Variant | |
| id_table | Variant |
| Signature | Return Type | Description |
|---|---|---|
| get( value:Variant ) | Variant |
extends Object
| Name | Type | Description |
|---|---|---|
| bit_depth | Int32 | |
| channels | WAVChannel[] | |
| error | String | |
| format | WAVFormat | |
| page_align | Logical | |
| sample_rate | Int32 |
| Signature | Return Type | Description |
|---|---|---|
| init( file:File ) | ||
| init( format:WAVFormat, bit_depth:Int32, sample_rate:Int32 ) | ||
| create_channel() | WAVChannel | |
| save( file:File ) | Logical | |
| to<<String>>() | String | |
| validate() | Logical |
extends Object
| Name | Type | Description |
|---|---|---|
| samples | Real32[] | |
| wav | WAV |
| Signature | Return Type | Description |
|---|---|---|
| init( wav:WAV ) | ||
| add( sample:Real ) | ||
| count() | Int32 | |
| get( index:Int32 ) | Real | |
| read( reader:DataReader ) | ||
| write( index:Int32, writer:DataWriter ) |
extends Object
http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html http://tiny.systems/software/soundProgrammer/WavFormatDocs.pdf
| Name | Type | Description |
|---|---|---|
| reader | DataReader | |
| wav | WAV |
| Signature | Return Type | Description |
|---|---|---|
| decode( reader:DataReader, wav:WAV ) | Logical | |
| id_to_string( id:Int32 ) | String | |
| read_another_chunk() |
extends Object
| Signature | Return Type | Description |
|---|---|---|
| encode( wav:WAV ) | Byte[] | |
| encoded_size( wav:WAV ) | Int32 |
incorporates CommonCompoundMethods
| Category | Value | Description |
|---|---|---|
| PCM | 1 | |
| IEEE_FLOAT | 3 | |
| ALAW | 6 | 8-bit ITU-T G.711 A-law |
| MULAW | 7 | 8-bit ITU-T G.711 µ-law |
| EXTENSIBLE | 65534 | Determined by SubFormat |
| Name | Type | Description |
|---|---|---|
| categories | WAVFormat[] |
| Signature | Return Type | Description |
|---|---|---|
| create( name:String ) | WAVFormat | |
| create( value:Int ) | WAVFormat |
| Name | Type | Description |
|---|---|---|
| value | Int |
| Signature | Return Type | Description |
|---|---|---|
| description() | String | |
| exists() | Logical | |
| hashcode() | Int | |
| name() | String | |
| operator?() | Logical | |
| operator==( other:WAVFormat ) | Logical | |
| print_to( buffer:PrintWriter ) | ||
| to<<Int>>() | Int | |
| to<<Object>>() | Object | |
| to<<String>>() | String | |
| to<<Variant>>() | Variant | |
| type_info() | TypeInfo |
extends Object
| Name | Type | Description |
|---|---|---|
| next_column | Int | |
| next_filepath | String | |
| next_line | Int |
| Signature | Return Type | Description |
|---|---|---|
| create( content:String, [line=1:Int], [column=1:Int] ) | XML | |
| create( file:File, [line=1:Int], [column=1:Int] ) | XML | |
| create( filepath:String, content:String, [line=1:Int], [column=1:Int] ) | XML | |
| element( [name=null:String] ) | XML | |
| list() | XML | |
| set_position( filepath:String, line:Int, column:Int ) | ||
| text( text:String ) | XML |
| Name | Type | Description |
|---|---|---|
| attributes | [String:String] | |
| children | XML[] | |
| column | Int | |
| filepath | String | |
| line | Int | |
| text | String | |
| type | XMLNodeType |
| Signature | Return Type | Description |
|---|---|---|
| init( type:XMLNodeType, [text=null:String] ) | ||
| add( child:XML ) | ||
| content() | String | 'children' returns a list of XML nodes but 'content' returns them in string form |
| count() | Int | |
| find( fn:Function(XML)->Logical ) | XML | |
| get( index:Int ) | XML | |
| get( name:String ) | String | |
| insert( child:XML, [before_index=0:Int] ) | ||
| is_list() | Logical | |
| is_text() | Logical | |
| is_element( [name=null:String] ) | Logical | |
| is_end_tag( [name=null:String] ) | Logical | |
| is_start_tag( [name=null:String] ) | Logical | |
| name() | String | |
| set( name:String, value:String ) | ||
| to<<String>>() | String | |
| to<<String>>( &formatted ) | String | |
| write( builder:String, &formatted ) | String |
incorporates CommonCompoundMethods
has a name and possibly attributes and child nodes
| Category | Value | Description |
|---|---|---|
| ELEMENT | 0 | has a name and possibly attributes and child nodes |
| LIST | 1 | unnamed element with no attributes, just children |
| TEXT | 2 | a text node with no attributes or children |
| START_TAG | 3 | intermediate type |
| END_TAG | 4 | intermediate type |
| Name | Type | Description |
|---|---|---|
| categories | XMLNodeType[] |
| Signature | Return Type | Description |
|---|---|---|
| create( name:String ) | XMLNodeType | |
| create( value:Int ) | XMLNodeType |
| Name | Type | Description |
|---|---|---|
| value | Int |
| Signature | Return Type | Description |
|---|---|---|
| description() | String | |
| hashcode() | Int | |
| name() | String | |
| operator?() | Logical | |
| operator==( other:XMLNodeType ) | Logical | |
| print_to( buffer:PrintWriter ) | ||
| to<<Int>>() | Int | |
| to<<Object>>() | Object | |
| to<<String>>() | String | |
| to<<Variant>>() | Variant | |
| type_info() | TypeInfo |
extends Object
| Name | Type | Description |
|---|---|---|
| nodes | XML[] | |
| preformatted | Int | |
| scanner | XMLScanner |
| Signature | Return Type | Description |
|---|---|---|
| init() | ||
| consume_whitespace( builder:String ) | ||
| discard_comment() | ||
| nodify_another() | Logical | |
| nodify( file:File, [line=1:Int], [column=1:Int] ) | XML[] | |
| nodify( filepath:String, content:String, [line=1:Int], [column=1:Int] ) | XML[] | |
| tokenize_end_tag() | ||
| tokenize_tag() | ||
| tokenize_text() |
extends Object
| Name | Type | Description |
|---|---|---|
| default_standalone_tags | String[] |
| Name | Type | Description |
|---|---|---|
| standalone_tags | [String:String] |
| Signature | Return Type | Description |
|---|---|---|
| init() | ||
| add_standalone_tag( name:String ) | name example: image | |
| collapse_nodes( nodes:XML[] ) | ||
| configure_standalone_tags() | ||
| parse( file:File, [line=1:Int], [column=1:Int] ) | XML | |
| parse( filepath:String, content:String, [line=1:Int], [column=1:Int] ) | XML |
extends Scanner
| Name | Type | Description |
|---|---|---|
| column | Int | |
| count | Int | |
| data | Character[] | |
| filepath | String | |
| line | Int | |
| position | Int | |
| source | String | |
| spaces_per_tab | Int |
| Signature | Return Type | Description |
|---|---|---|
| init( filepath:String, content:String, [line=1:Int], [column=1:Int] ) | ||
| consume_whitespace() | Logical | |
| consume_end_tag( name:String ) | Logical | |
| next_is_end_tag( name:String ) | Logical | |
| scan_lowercase_id() | String |
extends Object
| Name | Type | Description |
|---|---|---|
| @native90 | RogueCNativeProperty | |
| compression | Int32 | 0 (uncompressed) to 9 (maximum compression) |
| filepath | String | |
| mode | Int32 | CLOSED, READ, WRITE, APPEND, DELETE (can change frequently internally) |
| Signature | Return Type | Description |
|---|---|---|
| init( zipfile:File, [compression=Zip.COMPRESSION_DEFAULT:Int32] ) | ||
| add( archive_filepath:String, data:Byte[], [compression=null:Int32?], &verbose ) | ||
| add( archive_filepath:String, data:String, [compression=null:Int32?], &verbose ) | ||
| add( archive_filepath:String, file:File, [compression=null:Int32?], &verbose ) | ||
| add( file:File, [compression=null:Int32?], &ignore_hidden=true, &verbose ) | ||
| add( files:Files, [compression=null:Int32?], &ignore_hidden=true, &verbose ) | ||
| close() | ||
| count() | Int32 | |
| extract( folder:File, &verbose ) | ||
| find( name:String ) | ZipEntry[] | |
| find( pattern:FilePattern ) | ZipEntry[] |
Examples: zip.find( "ExactName.txt" ) -> result count 0 or 1 zip.find( "*.txt" ) -> result count 0+ |
| get( index:Int32 ) | ZipEntry | |
| on_cleanup() | ||
| open( zipfile:File, [compression=Zip.COMPRESSION_DEFAULT:Int32], [new_mode=Zip.CLOSED:Int32] ) | ||
| remove( list:ZipEntry[] ) | ||
| remove( name:String ) | ||
| remove( pattern:FilePattern ) | ||
| set_compression( new_compression:Int32 ) | ||
| set_mode( new_mode:Int32 ) | ||
| to<<String>>() | String |
incorporates CommonCompoundMethods
| Name | Type | Description |
|---|---|---|
| buffer | Byte[] |
| Signature | Return Type | Description |
|---|---|---|
| create( zip:Zip, name:String, is_folder:Logical, size:Int64, crc32:Int32 ) | ZipEntry |
| Name | Type | Description |
|---|---|---|
| crc32 | Int32 | |
| is_folder | Logical | |
| name | String | |
| size | Int64 | |
| zip | Zip |
| Signature | Return Type | Description |
|---|---|---|
| description() | String | |
| extract_bytes() | Byte[] | |
| extract_string() | String | |
| extract( buffer:Byte[] ) | Byte[] | |
| extract( file:File ) | ||
| operator==( other:ZipEntry ) | Logical | |
| print_to( buffer:PrintWriter ) | ||
| to<<Object>>() | Boxed<<ZipEntry>> | |
| to<<String>>() | String | |
| to<<Variant>>() | Variant | |
| type_info() | TypeInfo |