需要zLIB专家的VB.NET功能帮助 [英] Need help from a zLIB expert for VB.NET function

查看:100
本文介绍了需要zLIB专家的VB.NET功能帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

需要知道我是否在浪费时间.使用UltraID3lib,它不会解压缩帧,而是使用异常函数将它们存储在数组中.使用的标志表示已压缩但未加密.

如果字节确实经过zLIB压缩并且格式正确: 考虑到我对zLIB完全一无所知,而且我只是一名兼职编码员,从小就垂头丧气,我该如何解压缩它们. (请慢慢解释).

MP3用户定义的帧(TXXX)包含一个小的xml字符串. 快速(错误的示例)获取UltraID3Lib存储的字节数组:

UltraID3.Read(MP3FileName) 'actual file in folder

Dim byte1 As ID3v23EncryptedCompressedFrame
For Each byte1 In UltraID3.ID3v2Tag.Frames
    Dim str1 = byte1.FrameBytes
    Dim result1 = BytesToString2(str1)
    Stop 'lets see what we got
Next

此站点说,如果它的zLib压缩开始时附近有789C,请执行以下操作: http://www.xtremevbtalk.com/showthread.php?t=318843

我使用了这些function2来转换为十六进制: https://social.msdn.microsoft.com/Forums/vstudio/en-US/fa53ce74-fd53-4d2a-bc05-619fb9d32481/convert-byte-array-to-hex-string?forum = vbgeneral

文章开头的示例功能1:

000B0789C6330377433D63534D575F3F737B570343767B02929CA2C4B2D4BCD2B29B6B31D376367989B9A976C519F9E5ACE1989452736

文章末尾的示例功能2:

000000B0789C6330377433D63534D575F3F737B570343767B02929CA2C4B2D4BCD2B29B6B301D376367989B9A976C519F9E50ACE1989452536FA60019B924C20696800017A10CA461F2C6AA30FD58A61427E5E72AA42228592720

解决方案

您的示例函数2"是有效zlib流的十六进制表示形式,从789c开始,压缩为:

71F3-15-FOO58A77<trivevents><event><name>show Chart</name><time>10000000.000000</time></event><event><name>show once a</name><time>26700000.000000</time></event></trivevents>

但是,示例功能1"是示例功能2"的损坏版本,由于某些原因,其中一些缺少零位数字.

您可以使用.NET DeflateStream 要解压缩的类.

Need to know if I'm wasting my time on this. Using UltraID3lib which does not decompress frames but stores them in an array using an exception function. The flags used says they are compressed but not Encrypted.

If the bytes are indeed zLIB compressed and in the the correct format: How can I decompress them, given that fact I know absolutely nothing about zLIB and I'm just a part time coder who was drop on he's head as a child. (Please explain slowly).

The MP3 user-defined frame (TXXX) holds a small xml string. A fast (bad example) to get the byte array stored by UltraID3Lib:

UltraID3.Read(MP3FileName) 'actual file in folder

Dim byte1 As ID3v23EncryptedCompressedFrame
For Each byte1 In UltraID3.ID3v2Tag.Frames
    Dim str1 = byte1.FrameBytes
    Dim result1 = BytesToString2(str1)
    Stop 'lets see what we got
Next

This site says if it has 789C near the beginning its zLib compressed: http://www.xtremevbtalk.com/showthread.php?t=318843

I used these function2 to convert to hex: https://social.msdn.microsoft.com/Forums/vstudio/en-US/fa53ce74-fd53-4d2a-bc05-619fb9d32481/convert-byte-array-to-hex-string?forum=vbgeneral

example function 1 at start of article:

000B0789C6330377433D63534D575F3F737B570343767B02929CA2C4B2D4BCD2B29B6B31D376367989B9A976C519F9E5ACE1989452536FA6019B924C206968017A10CA461F2C6AA3FD58A61427E5E72AA42228A114666E6F88CD04772110D5923799

example function 2 at end of article:

000000B0789C6330377433D63534D575F3F737B570343767B02929CA2C4B2D4BCD2B29B6B301D376367989B9A976C519F9E50ACE1989452536FA60019B924C20696800017A10CA461F2C6AA30FD58A61427E5E72AA42228A114666E6F88CD047721100D5923799

解决方案

Your "example function 2" is a hex representation of a valid zlib stream, starting with the 789c, which decompresses to:

71F3-15-FOO58A77<trivevents><event><name>show Chart</name><time>10000000.000000</time></event><event><name>show once a</name><time>26700000.000000</time></event></trivevents>

However "example function 1" is a corrupted version of "example function 2", with, for some reason, several missing zero digits.

You can use the .NET DeflateStream class to decompress.

这篇关于需要zLIB专家的VB.NET功能帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆