FBX文件中使用的压缩算法是什么?

时间:2015-07-08 06:31:39

标签: import zip compression blender fbx

我编写了更为简单的fbx文件,引导了此链接https://code.blender.org/2013/08/fbx-binary-file-format-specification/上的规范。它表示可以压缩数据集(例如,顶点数组)。好。从Blender导出时,我得到了压缩的顶点集,但是我无法解压缩它们,因为它们不适合任何一个库(DotNetZip,SharpZipLib)。怎么了?

示例:

注意:顶点是双重类型

û

ncompressed vertices in ascii fbx file: 

-12.500000,-12.500000,0.000000,12.500000,-12.500000,0.000000,-12.500000,12.500000,0.000000,12.500000,12.500000,0.000000,-12.500000,-12.500000,25.000000,12.500000,-12.500000,25.000000,-12.500000,12.500000,25.000000,12.500000,12.500000,25.000000

压缩二进制数据:

    [0] 120 byte
    [1] 1   byte
    [2] 99  byte
    [3] 96  byte
    [4] 0   byte
    [5] 1   byte
    [6] 205 byte
    [7] 3   byte
    [8] 96  byte
    [9] 10  byte
    [10]    78  byte
    [11]    67  byte
    [12]    120 byte
    [13]    64  byte
    [14]    113 byte
    [15]    7   byte
    [16]    28  byte
    [17]    226 byte
    [18]    7   byte
    [19]    160 byte
    [20]    226 byte
    [21]    80  byte
    [22]    121 byte
    [23]    8   byte
    [24]    15  byte
    [25]    73  byte
    [26]    61  byte
    [27]    186 byte
    [28]    248 byte
    [29]    1   byte
    [30]    136 byte
    [31]    10  byte
    [32]    152 byte
    [33]    61  byte
    [34]    150 byte
    [35]    80  byte
    [36]    121 byte
    [37]    116 byte
    [38]    243 byte
    [39]    225 byte
    [40]    226 byte
    [41]    48  byte
    [42]    245 byte
    [43]    80  byte
    [44]    117 byte
    [45]    112 byte
    [46]    113 byte
    [47]    52  byte
    [48]    125 byte
    [49]    150 byte
    [50]    14  byte
    [51]    0   byte
    [52]    146 byte
    [53]    244 byte
    [54]    12  byte
    [55]    117 byte

1 个答案:

答案 0 :(得分:2)

该数据为zlib stream,可以使用zlib解压缩。解压缩的结果以十六进制显示:

00 00 00 00 00 00 29 c0 00 00 00 00 00 00 29 c0
00 00 00 00 00 00 00 00 00 00 00 00 00 00 29 40
00 00 00 00 00 00 29 c0 00 00 00 00 00 00 00 00
00 00 00 00 00 00 29 c0 00 00 00 00 00 00 29 40
00 00 00 00 00 00 00 00 00 00 00 00 00 00 29 40
00 00 00 00 00 00 29 40 00 00 00 00 00 00 00 00
00 00 00 00 00 00 29 c0 00 00 00 00 00 00 29 c0
00 00 00 00 00 00 39 40 00 00 00 00 00 00 29 40
00 00 00 00 00 00 29 c0 00 00 00 00 00 00 39 40
00 00 00 00 00 00 29 c0 00 00 00 00 00 00 29 40
00 00 00 00 00 00 39 40 00 00 00 00 00 00 29 40
00 00 00 00 00 00 29 40 00 00 00 00 00 00 39 40