An efficient data compression algorithm for semantic-based ubiquitous computing applications