The invention discloses a Web3D data compression algorithm based on floating point case, which comprises the following steps: (1) will import the 3D file into the Web3D platform editor; (2) the internal editor will automatically extract the data format of 3D; (3) the webgl floating point accounted for 4 bytes of 32 bits, compression region 32KB; (4) from the beginning of 0 to find the same data in the range of 32KB were increased; (5) the same record between the current data and a data from the DIS, there is no duplication, the record is tiger; (6) obtained after traversing the dis data block, then Hoffman encoding on DIS data block; (7) the data table, dis table and tiger again Hoffman encoding; (8) extract, made according to Hoffman code table, restore metadata table and dis block, the Hoffman decode all the original data were 3 D render. The invention is a unit of 4 bytes, which omits the length because it specifies 4 bytes and saves the length of coding.
【技术实现步骤摘要】
一种基于浮点数情况的Web3D数据压缩算法
本专利技术涉及一种压缩算法,具体是一种基于浮点数情况的Web3D数据压缩算法。
技术介绍
数据压缩是指在不丢失有用信息的前提下,缩减数据量以减少存储空间,提高其传输、存储和处理效率,或按照一定的算法对数据进行重新组织,减少数据的冗余和存储的空间的一种技术方法。在计算机科学和信息论中,数据压缩或者源编码是按照特定的编码机制用比未经编码少的数据位元(或者其它信息相关的单位)表示信息的过程。一种流行的压缩实例是许多计算机都在使用的ZIP文件格式,它不仅仅提供了压缩的功能,而且还作为归档工具(Archiver)使用,能够将许多文件存储到同一个文件中。ZIP,是一个计算机文件的压缩的算法,专利技术者为菲利普·卡兹(PhilKatz)),他于1989年1月公布了该格式的资料。ZIP通常使用后缀名".zip",它的MIME格式为application/zip。zip是一个字节为一个单位,相同字节要大于3字节才会记录dis,zip是距离+长度来表示。
技术实现思路
本专利技术的目的在于提供一种基于浮点数情况的Web3D数据压缩算法,以解决上 ...
【技术保护点】
一种基于浮点数情况的Web3D数据压缩算法,其特征在于,包括以下步骤:(1)将3D格式文件导入到Web3D平台编辑器中;(2)编辑器内部自动将其3D格式的数据提取出来;(3)webgl浮点数占4字节32位,压缩区域取32kb;(4)从0开始在32kb范围内查找相同数据,依次递增;(5)如有相同,则记录当前数据和上一个数据的之间的距离dis,如果没有重复,则记录tiger;(6)遍历后得到dis数据块,再对dis数据块做霍夫曼编码,即按照出现最多最短;(7)最后再对数据码表,dis码表和tiger 再次做霍夫曼编码;(8)解压,取得码表,按照霍夫曼还原出元数据码表和dis块, ...
【技术特征摘要】
1.一种基于浮点数情况的Web3D数据压缩算法,其特征在于,包括以下步骤:(1)将3D格式文件导入到Web3D平台编辑器中;(2)编辑器内部自动将其3D格式的数据提取出来;(3)webgl浮点数占4字节32位,压缩区域取32kb;(4)从0开始在32kb范围内查找相同数据,依次递增;(5)如有相同,则记录当前数据和上一个数据的之间的距离dis,如果没有重复,则记录tige...
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。