5 Delta(const Block &block) {
8 memset(&stream_, 0, sizeof (stream_));
9 memset(&config, 0, sizeof (config));
11 xd3_init_config(&config, XD3_SKIP_EMIT | XD3_ADLER32_NOVER);
13 CHECK_EQ(0, xd3_config_stream (&stream_, &config));
15 xd3_avail_input (&stream_, block.Data(), block.Size());
19 ret = xd3_decode_input(&stream_);
26 CHECK_EQ(0, xd3_whole_append_window (&stream_));
33 DP(RINT "error code %s\n", xd3_strerror (ret));
40 xd3_free_stream(&stream_);
43 xoff_t AddedBytes() const {
44 return stream_.whole_target.addslen;
47 xoff_t Windows() const {
48 return stream_.whole_target.wininfolen;
52 for (size_t i = 0; i < stream_.whole_target.instlen; i++) {
53 xd3_winst &winst = stream_.whole_target.inst[i];
56 DP(RINT "%"Q"u run %u\n", winst.position, winst.size);
59 DP(RINT "%"Q"u add %u\n", winst.position, winst.size);
62 DP(RINT "%"Q"u copy %u @ %"Q"u (mode %u)\n",
63 winst.position, winst.size, winst.addr, winst.mode);