add method to decode bitmap stream

Change-Id: Ibed8bf5676d45398ebd021f514c9188bc29b937e
Fix code formatting

Change-Id: Ia17b21c1f4a959fd3fca8fb34f078139381ca61e