Ask Your Question

What compression use a sws worksheet file?

asked 2012-06-21 11:48:00 +0200

Pedro gravatar image

(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 12:18:00 +0200

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 12:22:08 +0200 )edit

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

kcrisman gravatar imagekcrisman ( 2012-06-21 12:25:51 +0200 )edit

answered 2012-06-21 12:19:09 +0200

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

answered 2012-06-21 15:05:23 +0200

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 gravatar imagePedro ( 2012-06-22 05:25:30 +0200 )edit

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 11:48:00 +0200

Seen: 880 times

Last updated: Jun 21 '12