Skill template format

Overall Format
The skill template is a single line that is a base64 encoded bit stream as defined in rfc3548 using + and / as the 62nd and 63rd characters respectively.

Numbers of varying number of bits are placed into the bitstream. Assuming that the bit stream already has 4 bits of data (the X's) adding a 5 bit number would have its bits placed like this: +-+-+-+-+-+-+ +-+-+-+-+-+-+ +-+-+-+-+-+-+ +-+-+-+-+-+-+
 * 1|0|X|X|X|X| | | | |4|3|2|

The contents of the bit stream

 * 6 bits - always 0, assumed to indicate the version and that this is a Skill Template.
 * 4 bits - Primary profession (see table below)
 * 4 bits - Secondary profession (see table below)
 * 4 bits - The number of attributes specified in the template
 * 4 bits - Size of attribute codes. All attribute codes are the same size, and the size (in bits) is equal to 4 plus this number. For example, if the size is 2, each of the attribute codes will be 6 bits.
 * Sequence of attribute codes and values
 * (4 + size) bits - attribute code (see table below)
 * 4 bits - value of attribute, this is 0 - 12, and does not take into account runes, headgear, etc.
 * 4 bits - Size of the skill codes. This works in the same way as the attribute size, except that each skill code is (8 + size) bits.
 * Sequence of exactly 8 skill codes
 * (8 + size) bits - skill code (see table below)

Profession Codes

 * 0 - None (only valid for secondary)
 * 1 - Warrior
 * 2 - Ranger
 * 3 - Monk
 * 4 - Necromancer
 * 5 - Mesmer
 * 6 - Elementalist
 * 7 - Assassin
 * 8 - Ritualist
 * 9 - Paragon
 * 10 - Dervish

Attribute Codes

 * 0 - Fast Casting
 * 1 - Illusion Magic
 * 2 - Domination Magic
 * 3 - Inspiration Magic
 * 4 - Blood Magic
 * 5 - Death Magic
 * 6 - Soul Reaping
 * 7 - Curses
 * 8 - Air Magic
 * 9 - Earth Magic
 * 10 - Fire Magic
 * 11 - Water Magic
 * 12 - Energy Storage
 * 13 - Healing Prayers
 * 14 - Smiting Prayers
 * 15 - Protection Prayers
 * 16 - Divine Favor
 * 17 - Strength
 * 18 - Axe Mastery
 * 19 - Hammer Mastery
 * 20 - Swordsmanship
 * 21 - Tactics
 * 22 - Beast Mastery
 * 23 - Expertise
 * 24 - Wilderness Survival
 * 25 - Marksmanship
 * 26 - ?
 * 27 - ?
 * 28 - ?
 * 29 - Dagger Mastery
 * 30 - Deadly Arts
 * 31 - Shadow Arts
 * 32 - Communing
 * 33 - Restoration Magic
 * 34 - Channeling Magic
 * 35 - Critical Strikes
 * 36 - Spawning Power
 * 37 - Spear Mastery
 * 38 - Command
 * 39 - Motivation
 * 40 - Leadership
 * 41 - Scythe Mastery
 * 42 - Wind Prayers
 * 43 - Earth Prayers
 * 44 - Mysticism

Skill codes

 * 0 - Empty slot
 * 2 - Resurrection Signet
 * 3 - Signet of Capture
 * 5 - Power Block
 * 6 - Mantra of Earth
 * 7 - Mantra of Flame
 * 8 - Mantra of Frost
 * 9 - Mantra of Lightning
 * 10 - Hex Breaker
 * 11 - Distortion
 * 13 - Mantra of Recovery
 * 14 - Mantra of Persistence
 * 15 - Mantra of Inscriptions
 * 16 - Mantra of Concentration
 * 17 - Mantra of Resolve
 * 18 - Mantra of Signets
 * 19 - Fragility
 * 21 - Inspired Enchantment
 * 22 - Inspired Hex
 * 23 - Power Spike
 * 24 - Power Leak
 * 25 - Power Drain
 * 26 - Empathy
 * 27 - Shatter Delusions
 * 28 - Backfire
 * 29 - Blackout
 * 30 - Diversion
 * 31 - Conjure Phantasm
 * 32 - Illusion of Weakness
 * 33 - Illusionary Weaponry
 * 34 - Sympathetic Visage
 * 35 - Ignorance
 * 36 - Arcane Conundrum
 * 37 - Illusion of Haste
 * 38 - Channeling
 * 39 - Energy Surge
 * 40 - Ether Feast
 * 41 - Ether Lord
 * 42 - Energy Burn
 * 43 - Clumsiness
 * 44 - Phantom Pain
 * 46 - Guilt
 * 47 - Ineptitude
 * 48 - Spirit of Failure
 * 49 - Mind Wrack
 * 50 - Wastrel's Worry
 * 51 - Shame
 * 52 - Panic
 * 53 - Migraine
 * 54 - Crippling Anguish
 * 55 - Fevered Dreams
 * 56 - Soothing Images
 * 57 - Cry of Frustration
 * 58 - Signet of Midnight
 * 59 - Signet of Weariness
 * 61 - Leech Signet
 * 62 - Signet of Humility
 * 63 - Keystone Signet
 * 65 - Arcane Mimicry
 * 66 - Spirit Shackles
 * 67 - Shatter Hex
 * 68 - Drain Enchantment
 * 69 - Shatter Enchantment
 * 72 - Elemental Resistance
 * 73 - Physical Resistance
 * 74 - Echo
 * 75 - Arcane Echo
 * 76 - Imagined Burden
 * 77 - Chaos Storm
 * 78 - Epidemic
 * 79 - Energy Drain
 * 80 - Energy Tap
 * 81 - Arcane Thievery
 * 82 - Mantra of Recall
 * 306 - Rebirth
 * 783 - Unsuspecting Strike
 * 814 - Shadow Refuge
 * 1018 - Critical Eye
 * 1019 - Critical Strike
 * 1022 - Wild Strike
 * 1030 - Locust's Fury
 * 1043 - Dash

Obviously a lot of skill codes are missing, please add them.