How to emulate dcraw -D (dcraw document mode)

Hi:
The sample program simple_dcraw do not emulate dcraw -D. I did not get the same file when running dcraw -D xxx.cr2
and simple_dcraw -D xxx.cr2.
I'm using Libraw 0.16.0.
Thanks.

Forums: 

Latest versions of dcraw have

Latest versions of dcraw have changed much in document mode, LibRaw sample may be not up-to-date.

Please specify what kind of output do you want to receive and I'll provide you imgdata.params you need to set to get this mode from LibRaw.

-- Alex Tutubalin @LibRaw LLC

Update:

Update:
document_mode is dropped from simple_dcraw (although help not changed, sorry) due to LibRaw internals change.

To get unprocessed raw data please use these LibRaw samples:
4channels - to get per-channel data in separate files
unprocessed_raw to get unprocessed raw data in 1-color bitmap.

-- Alex Tutubalin @LibRaw LLC