Ask Your Question

What compression use a sws worksheet file?

asked 2012-06-21 04:48:00 -0500

(I remember reading about it but could find again.)

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2012-06-21 05:18:00 -0500

benjaminfjones gravatar image

It's a tar.bz2 file. You can decompress and unpack a worksheet like so:

tar xvjf Interval_Notation.sws

results in a directory called sage_worksheet with contents:

drwxr-xr-x  7 ?  staff   238 Jun 21 10:15 cells
-rw-r--r--  1 ?  staff  6032 Feb 21  2011 worksheet.html
-rw-------  1 ?  staff  6062 Feb 21  2011 worksheet.txt
-rw-r--r--  1 ?  staff   169 Feb 21  2011 worksheet_conf.pickle
edit flag offensive delete link more


Will it *always* have `cells`? I have one that doesn't, and it's a brand-new worksheet, even...

kcrisman gravatar imagekcrisman ( 2012-06-21 05:22:08 -0500 )edit

It may also have a `data` directory, if one has uploaded data...

kcrisman gravatar imagekcrisman ( 2012-06-21 05:25:51 -0500 )edit

answered 2012-06-21 08:05:23 -0500

Jason Grout gravatar image

You can also use the unix file command to investigate if you don't know.

% file zemek.sws 
zemek.sws: bzip2 compressed data, block size = 900k
edit flag offensive delete link more


Thanks. 'file' is new to me and a nice tool. A long term idea is to pre-build worksheets, a different one for each user to upload each.

Pedro Cruz gravatar imagePedro Cruz ( 2012-06-21 22:25:30 -0500 )edit

answered 2012-06-21 05:19:09 -0500

kcrisman gravatar image

It's a bzip2'ed file - apparently a tar.bz2 file, to be precise. See, among others.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2012-06-21 04:48:00 -0500

Seen: 424 times

Last updated: Jun 21 '12