new function tg-data:read-archive and changes to tg-data:save-db