Email message bodies - Compression?

Post questions on how to interpret your Bullhorn SQL Server backup of your Database.

Moderators: StaffingSupport, s.emmons

nickf77
User
Posts: 5
Joined: Wed Jul 10, 2013 5:40 pm

Re: Email message bodies - Compression?

Post by nickf77 » Thu Aug 15, 2013 4:59 pm

clarcon wrote:Nick,

I could use some help with this. I am not able to PM or email you through this forum. I have been struggling with this as well with VB and I do not write in C#.
clarcon, I really do encourage you to try it in C# - the libraries are slightly different even as similar as VB and C# are behind the scenes. If you know Java, C# honestly isn't all that different as far as syntax is concerned.

Can you see my contact info on my profile page? I'm willing to help you out with it in some of my free time.

pbhuttan
User
Posts: 2
Joined: Wed Aug 28, 2013 11:43 am

Re: Email message bodies - Compression?

Post by pbhuttan » Tue Sep 10, 2013 1:09 am

Hi Nick

We couldn't find your contact details therefore would request you to suggest a way to establish a contact with you. You can drop me an email (prashant@techmatrixconsulting.com) with you contact details. We have been looking for a resolution around this from more than a month now and so far all efforts have been exhausted.

We will be highly obliged if you could support us resolve this matter as the client has huge expectation from us.

Thanking you in advance
Prashant Bhuttan
prashant@techmatrixconsulting.com

pbhuttan
User
Posts: 2
Joined: Wed Aug 28, 2013 11:43 am

Re: Email message bodies - Compression?

Post by pbhuttan » Mon Sep 23, 2013 8:05 am

Hi All

is there anyone in this group who can help us resolve this compression issue. We still haven't been able to crack this code and find out a way to make this data readable. We tried the code shared by few group members also tried couple of other ways but no success yet.

We will be obliged if anyone can step up and help to resolve this issue.

Thanks
Prashant Bhuttan
prashant@techmatrixconsulting.com

chris.sargent
User
Posts: 30
Joined: Wed Dec 31, 1969 8:00 pm

Re: Email message bodies - Compression?

Post by chris.sargent » Tue Sep 24, 2013 9:05 am

Hi Prashant,

I haven't spent much time on this recently, hence no updates. However, as above, I have worked out how to see each message one at time - being able to uncompress it - but I didn't work out how to do all the records in one go.

If we can help each other with it, I'd be more than happy!

My email is chris(you know what goes here)akascia.com

Chris

chris.sargent
User
Posts: 30
Joined: Wed Dec 31, 1969 8:00 pm

Re: Email message bodies - Compression?

Post by chris.sargent » Tue Oct 29, 2013 10:22 am

Okay.... I'm back on to this, pretty much starting where I left off - I'll read up on the data sets or whatever you mentioned.

chris.sargent
User
Posts: 30
Joined: Wed Dec 31, 1969 8:00 pm

Re: Email message bodies - Compression?

Post by chris.sargent » Thu Oct 31, 2013 11:56 am

I commissioned a developer to write a program to solve this issue. It reads each row in the UserMessage Table, finds the compressed email body, uncompresses it and then copies the raw HTML back in to the Table in a new column called CommentsUncompressed. It does it one row at a time so there are no memory issues but it does take a little while with lots of records. Probably about an hour for 100,000 or so. If anyone else is interested or is having this problem please let me know and I'll happily pass his details on to you.

For anyone trying to solve the problem on their own... in his words "It was not zipped, it was HTML compressed to a stream"

jwindeyer
User
Posts: 6
Joined: Wed Dec 31, 1969 8:00 pm

Re: Email message bodies - Compression?

Post by jwindeyer » Mon Dec 09, 2013 1:47 am

We are having the same problem decoding these messages.

Our developer checked the documentation of "CHILKAT" and found that the code examples do not matching to their documentation.

Can anyone provide and instructions of information on how to do this using JAVA.

Regards, jerremy

htran811
User
Posts: 2
Joined: Wed Aug 12, 2015 7:14 pm

Re: Email message bodies - Compression?

Post by htran811 » Wed Aug 12, 2015 7:17 pm

Hi guys. I am working on Email Message table in Bullhorn backup. I have a few questions.

1. The data looks in hexa decimal format. Is that true?
2. What kind of data it is (image/text)?
3. What are the steps that we need to do to get actual data?

Thank you very much

apsmith
Site Admin
Posts: 2053
Joined: Wed Dec 31, 1969 8:00 pm

Re: Email message bodies - Compression?

Post by apsmith » Mon Aug 17, 2015 9:10 am

The data is not hex, it is compressed binary. This string has all the details needed to decompress.
Andrew Smith
Director, Technical Operations
Developer Forum Admin

mary158
User
Posts: 6
Joined: Wed Feb 10, 2016 8:59 pm
Contact:

Re: Email message bodies - Compression?

Post by mary158 » Wed Feb 10, 2016 9:21 pm

I finally managed to find a solution for my problem. Thank you for sharing the solution!

puruk16
User
Posts: 6
Joined: Thu Feb 11, 2016 6:52 pm
Contact:

Re: Email message bodies - Compression?

Post by puruk16 » Thu Feb 11, 2016 7:12 pm

Fortunately there is this forum , though not very active . It's helping to solve various problems like this .

boshier
User
Posts: 2
Joined: Wed Dec 27, 2017 6:50 am

Re: Email message bodies - Compression?

Post by boshier » Wed Dec 27, 2017 9:36 am

Did anyone find a working solution for how to decompress the files?

boshier
User
Posts: 2
Joined: Wed Dec 27, 2017 6:50 am

Re: Email message bodies - Compression?

Post by boshier » Fri Dec 29, 2017 10:59 am

Did anyone find a working solution for how to decompress the files?

diptirajput
User
Posts: 4
Joined: Tue Sep 26, 2017 9:40 pm

Re: Email message bodies - Compression?

Post by diptirajput » Thu Jan 11, 2018 6:00 am

Hi Team,

Do you have any latest code samples to decompress commentsCompressed from BH_UserMessage into email message body?
Is there any way to do without using Chilkat?

Based on previous post, if it's standard zip compress of text, it should be uncompressed by reading image as blob from database and converting it into inputstream and then get content with ZipInputStream / GZIPInputStream.
But none of this works! Either we get no in gzip format or if zipinputstram then entry comes with null.

Could you please share some input to retrieve actual email message?

Thanks & regards,
Dipti

mopster
User
Posts: 1
Joined: Mon Feb 05, 2018 1:36 am
Contact:

Re: Email message bodies - Compression?

Post by mopster » Mon Feb 05, 2018 1:38 am

Here's how I was able to do it in PHP :

Code: Select all

/** $commentsCompressed contains the value of the commentsCompressed column of the UserMessage table */

// Remove the '0x' from the start of the string 
$hex = substr($commentsCompressed, 2);

// Convert from HEX to binary
$bin = hex2bin($hex);
// Decode using zlib
$text = zlib_decode($bin); // Contains the readable body of the email message

// Encode to UTF-8 (Had issues with saving this to MySQL)
$result = utf8_encode($text); // Contains the UTF-8 encoded body of the email message
Gist : https://gist.github.com/Mopster/7074a3d ... 40fc003b9b
Lead Software Developer @ Tamago-DB

Post Reply