cram reader in D (work in progress)