Adobe air bytearray




















Computers can differ in how they store multibyte numbers, that is, numbers that require more than 1 byte of memory to store them. An integer, for example, can take 4 bytes, or 32 bits, of memory. Some computers store the most significant byte of the number first, in the lowest memory address, and others store the least significant byte first. This attribute of a computer, or of byte ordering, is referred to as being either big endian most significant byte first or little endian least significant byte first.

For example, the number 0x would be stored as follows for big endian and little endian byte ordering, where a0 represents the lowest memory address of the 4 bytes and a3 represents the highest:. The endian property of the ByteArray class allows you to denote this byte order for multibyte numbers that you are processing.

The compress method allows you to compress a ByteArray in accordance with a compression algorithm that you specify as a parameter. The uncompress method allows you to uncompress a compressed ByteArray in accordance with a compression algorithm.

After calling compress and uncompress , the length of the byte array is set to the new length and the position property is set to the end.

The CompressionAlgorithm class defines constants that you can use to specify the compression algorithm. The lzma algorithm was added for Flash Player The deflate compression algorithm is used in several compression formats, such as zlib, gzip, and some zip implementations.

The following example compresses a ByteArray called bytes using the lzma algorithm:. The following example uncompresses a compressed ByteArray using the deflate algorithm:. A one-byte type marker describes the type of the encoded data that follows. AMF uses the following 13 data types:. Filters: Retrieving Data from Server Retrieving Data from Server Classes x. Package mx. Public Properties. Hide Inherited Public Properties.

The ByteArray class allows you to read from and write to a binary stream of data, which is essentially an array of bytes. This class provides a way to access data at the most elemental level. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Related 0. Hot Network Questions.



0コメント

  • 1000 / 1000