Add b64 parsing for Layer
Move layers data parsing to functions
Remove compress dependency
Move cast_from_le to utils