The mysterious innards of .RSS files...

TConnolly

Lifetime Supporting Member
Join Date
Apr 2005
Location
Salt Lake City
Posts
6,152
Has anyone ever opened a RSLogix500 .RSS file using 7-zip? Did you ever wonder why you would sometimes open a project and add a lot of code and comments and save the file and the .RSS file gets smaller? Or why the Big_Project.RSS file was smaller than the Little_Project.RSS file?

I recently installed 7zip to try it out as a replacement for WinZip. I used it this morning to open a zip file containing a .RSS file that I downloaded from another thread on this forum. In doing so I made an accidental discovery. I assumed that 7-zip would work like WinZip and if I double clicked on the .RSS file in the archive it would decompress the file and open it in RSLogix500.

Something quite unexpected happened instead. Apparently a .RSS file is in fact an archive and 7-zip recognized it and expanded it as such. Looking at a few different program it seems that a .RSS archive has 24 to 26 folders each with a variety of files.

That explains some of the mystery behind the variable size of .RSS files. Knowing that is probably useless, but I thought it was interesting. 🍺

A0429101017.JPG
 
thanks, this looks like something interesting to play with the next time I get some spare time ...

on a slightly related matter ... I've been trying to open a lot of ZIP files lately with WinZIP – but the resulting file comes up as 0 bytes in size – and then I can't open it with anything useful ...

but ...

if I right-click the ZIP file and use Windows to "Open With" the "Compressed (zipped) Folders" feature then everything works OK ...

I haven't had time to nail this all down – but it's driven me nuts (even more than usual) when I've tried to open a few of my customers' emailed files lately ... the work around seems to make it all better – at least for now ...
 
It's a Microsoft OLE docfile or structured storage file. This format allows multiple streams and sub-storage elements to be stored in a single file. 7Zip obviously knows how to open these. There a nice description of the file format at the link below. MDSN defines the IStorage and IStream interfaces used to play with it.

http://sc.openoffice.org/compdocfileformat.pdf
 
Thanks for the link Mike - it was interesting. After reading that I tried 7zip on word and excel documents, it opens and shows the structured storage file. It does not do .cd3 files though ;).
 
> It does not do .cd3 files though

EDICT-97 (our very old software) used to use structured storage files to store its databases, but we found that they were slow, and that sometimes they got corrupted. The nice thing about them is that you can open and close individual streams, which makes commit-or-rollback operations very easy to implement while keeping everything in a single disk file. It's certainly better than the horrible multiple file and directory structures that some packages use. But with Crimson, we load everything at once and then edit it in memory, so there's really not too much benefit. We therefore went with a simple text file that can be hand edited if for some reason it gets screwed up. C3 is just text, too, but compressed to keep the file size down. It can be decompressed using the expcd3 utility that we ship with the software.
 
Interesting thread, thanks for sharing Alaric. I also enjoyed your other thread about the plant operators and circumventing alarms, got a chuckle out of that.
 
Definitely reopening an old thread, but just thought I'd add some extra info to the table.

As discovered above, the .RSS file can be 'decompressed' into an MS compound document.

Looking at each of the actual objects though is somewhat depressing, as it's clearly still not human readable.
However, you can keep digging. Open a stream in a hex editor, and you'll find a bunch of data. the first 16 bytes seem to contain some sort of header presumably used by RSLogix, and looks something like:

02 00 00 00 10 00 00 00 0C 01 00 00 B6 64 00 00

No idea what the first 8 or last 4 bytes are, but bytes 8-11 (0C 01 00 00) are the length of the payload.
where 0x00 00 01 0C = 268 (bytes).

But bytes 16 onwards are the actual payload.

Each payload starts with 0x78 0x9C, which identifies the payload as a stream of data, encoded using zlib compression.

For a proof of concept, I've just pushed the payload through a zlib decompression algorith and found my code in beautiful plain text format.

I'll keep playing, and assuming I don't get sidetracked I'll hopefully be able to publish something that can pull code directly from the RSS file and save it as plain text.

(FYI I'm doing this because I'd like to be able to manage my project code using git/svn, and getting it into plain text is kind of important :) )
 
Probably the best necropost I've read. Fascinating stuff number-name-person, keep it up and keep us informed. Welcome to the forum.
 
I'll keep playing, and assuming I don't get sidetracked I'll hopefully be able to publish something that can pull code directly from the RSS file and save it as plain text.

(FYI I'm doing this because I'd like to be able to manage my project code using git/svn, and getting it into plain text is kind of important :) )
It could be also interesting to edit RSLogix 500 code without having the software.
 
Interesting, to a point...

Elcan said:
It could be also interesting to edit RSLogix 500 code without having the software.

As the thread's subject developed and dug deeper, I was waiting "fearfully" to read a post such as this. For me, "interesting" should at most go as far as a "hobby" project or "just for kicks". I love looking "under the hood", but I won't tinker with an "engine" I don't fully understand, especially if it could hurt or kill someone. I certainly would not entertain (or be allowed) attempt such edits, if possible, on a running, profit-making process.

I fear that edits without "having the software" could appeal to a lot of folks here, but could lead to all sorts of issues, let alone the copyright infringement aspect.

Not for me to stop anyone here, "No Sir!"; just some words of caution.

Regards,
George
 

Similar Topics

Ok. Riddle me this one. I have a machine that's been running for a couple of years. It is outfitted with a AB 1768-L43S Processor with a...
Replies
33
Views
11,426
Hi all, Why do I get these jobs! We have a customer who has imported a new multi axis stacking machine. The machine is minus wiring and controls...
Replies
11
Views
3,820
I had to laugh at an incident this week. I was asked through a third party if I could give a price and go to a company to take out a program...
Replies
8
Views
2,852
When I have a problem, it's usually a good one... I saw this today while looking for something else. It defies explanation. Pics taken from a...
Replies
9
Views
6,964
PLC-5 remote I/O rack, intermittantly faults on the remote I/O adapter. Green lite blinks, adapter fault lite is red, I/O rack fault is red...
Replies
9
Views
3,347
Back
Top Bottom