0

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

  • Example #1 unpacks to the rather unexciting string "71F3-15-FOO58A77=" -- see the `78 9C` bytes near the start? But teaching someone how to use zlib appears to me to be outside the scope and intention of Stack Overflow. There must be ready-to-follow tutorials elsewhere. – Jongware Oct 27 '14 at 00:49
  • That the correct info I needed. How did you do it? Maybe out of scope for question but need to know what code or dll i nedd to extract. I'm a rookie. – wally wingnut Oct 27 '14 at 00:55
  • I searched and I search so I am just giving up not much help here. – wally wingnut Oct 27 '14 at 05:06

1 Answers1

0

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.

Mark Adler
  • 101,978
  • 13
  • 118
  • 158
  • well I just spent 2 days trying experimenting with every code I could find to read it. Thank I'll restart with example 2 code. I just need to read save the desompress string (just like you have) in a variable for a webAudio audio cue marker program I have built. Any ideas where I should start looking for vb.net examples to decompress an a string or the origina array? – wally wingnut Oct 28 '14 at 04:28