anvil: write chunk lengths and compression type