First install atool, in ubuntu you do it with apt-get:
sudo apt-get install atool
Now update your rc.conf in ranger (after default instalation you need to copy-config from default skeleton.
ranger --copy-config all
). Now edit your bindings in ~/.config/ranger/rc.conf
map Pu shell atool -x %s map Pa shell atool -a %s
Now after pressing Pu/Pa archive is unpacked or directory/file is packed.