# Reading AS3 ABC bytecode with a hex editor?

**URL:** https://forum.kirupa.com/t/reading-as3-abc-bytecode-with-a-hex-editor/311462
**Category:** flash
**Created:** [July 7, 2010, 2:18pm UTC](https://forum.kirupa.com/t/reading-as3-abc-bytecode-with-a-hex-editor/311462 "2010-07-07T14:18:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![IQAndreas](https://avatars.discourse-cdn.com/v4/letter/i/f08c70/32.png) [@IQAndreas](https://forum.kirupa.com/u/IQAndreas)
#### Post date: [July 7, 2010, 2:18pm UTC](https://forum.kirupa.com/t/reading-as3-abc-bytecode-with-a-hex-editor/311462/1 "2010-07-07T14:18:25Z")

</div>

I have tried to learn a bit of the way AS3 works behind the scenes by skimming the surface of the AS3 bytecode.

I started with this document, and so far I’m at page 25 of 278. :sigh:  
[http://www.adobe.com/devnet/swf/pdf/swf\_file\_format\_spec\_v10.pdf](http://www.adobe.com/devnet/swf/pdf/swf_file_format_spec_v10.pdf)

I tried following along a bit, opening a SWF I had laying around and exploring the header. I was able to read the first 4 bytes until I got to “FrameSize”. The data type for that was RECT (found on page 16)

The problem is, the first value of the RECT is stored as **5 BITS** (not bytes). Since it doesn’t round up to an even 16 bits per “chunk of data”, it throws the “offset” of all bits off.

This means that unless I manually copy down the SWF hex values into binary data, reading this information simply with a Hex editor would not work, correct? Or is there anything I have missed such as some form of padding to offset this etc?
