Wrote some functions to encode and decode room info for DB saving and loading