I 'm trying to decode a lzjb compressed blocks and I have some hard times regarding big/little endian. I'm on x86 working with build 77.
#zdb -uuuu ztest ... rootbp = [L0 DMU objset] 400L/200P DVA[0]=<0:e0c98e00:200> ... ## zdb -R ztest:c0d1s4:e0c98e00:200: Found vdev: /dev/dsk/c0d1s4 ztest:c0d1s4:e0c98e00:200: 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef 000000: 00000003020e0a00 dd0304050020b601 .......... ..... 000010: c505048404040504 35b558231002047c ........|...#X.5 Looking at this blocks with dd: dd if=/dev/dsk/c0d1s4 iseek=7374023 bs=512 count=1 | od -x 0000000: 0a00 020e 0003 0000 b601 0020 0405 dd03 od -x is responsible for swapping every two bytes. I have on disk 0000000: 000a 0e02 0300 0000 01b6 0200 0504 03dd Comparing with the zdb output is every 8 bytes reversed. Now I don't know how to pass this to my lzjb decoding programm? Should I read the 512 bytes and pass them: - from the end - from the start and reverse every 8 bytes - or something else thanks for any advice bbr This message posted from opensolaris.org _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss