Fixed tmp_length misspelling.
Updated demos to work (better) with compressed binary data.