Christopher2222

MaplePrimes Activity


These are replies submitted by Christopher2222

Okay yes Maple uses the zlib for compression which stated at it's home site ...

"Not surprisingly, the compression algorithm used in zlib is essentially the same as that in gzip and Zip, namely,the`deflate' method that originated in PKWARE's PKZIP 2.x. "

Which is I think the LZ77 compression method and huffman coding.

Also as a side note reading files zipped from different programs in this manner one can compare to see if the same encoding method was used (ie. identical bits).  Of course winrar uses a different compression method.  Converting to bytes one can see winrar attaches RAR! to the beginning of it's compressed files, I guess for easy identification, although the RAR algorithm is closed so there's no way of creating a decompression algorithm on our own for uncompressing rar files ... but anyways.

So essentially Uncompress should work on a zipped file.

with(FileTools[Binary]):
with(StringTools):
Open("c:/test1.zip"):  # file test1.txt is zipped in the file with the words : This is a test
                                            0
a:=Read("c:/test1.zip",integer[1]);

 [80, 75, 3, 4, 10, 0, 2, 0, 0, 0, -102, 109, 81, 65, 50, -97, 122, -64, 14, 0,

  0, 0, 14, 0, 0, 0, 9, 0, 0, 0, 116, 101, 115, 116, 49, 46, 116, 120, 116,

  84, 104, 105, 115, 32, 105, 115, 32, 97, 32, 116, 101, 115, 116, 80, 75, 1,

  2, 20, 0, 10, 0, 2, 0, 0, 0, -102, 109, 81, 65, 50, -97, 122, -64, 14, 0, 0,

  0, 14, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 1, 0, 32, 0, -74, -127, 0, 0, 0, 0,

  116, 101, 115, 116, 49, 46, 116, 120, 116, 80, 75, 5, 6, 0, 0, 0, 0, 1, 0,

  1, 0, 55, 0, 0, 0, 53, 0, 0, 0, 0, 0]

b:=convert(a,Array,datatype=integer[1])

Uncompress(b)

I get an Error corrupt input data message

No, I couldn't get it to work, I get a list of numbers for the compressed file but can't convert it.  I probably have to create a procedure to decipher the compression method. Any help doing that would be welcome.

I first opened then read the file which gave me a list of numbers.  The Uncompress command required it to be in string format so I removed the brackets [ ] using the op command and then convert( xx , string) but Maple threw an error. 

Next I converted the list straight to string then removed the brackets [ ] and Uncompressed from there but no luck.

 

 

No, I couldn't get it to work, I get a list of numbers for the compressed file but can't convert it.  I probably have to create a procedure to decipher the compression method. Any help doing that would be welcome.

I first opened then read the file which gave me a list of numbers.  The Uncompress command required it to be in string format so I removed the brackets [ ] using the op command and then convert( xx , string) but Maple threw an error. 

Next I converted the list straight to string then removed the brackets [ ] and Uncompressed from there but no luck.

 

 

Thanks.  So even though it evaluates to true it's not actually the value of true unless it's evaluated as a boolean expression.  So it wasn't really a bug in 12 just a minor technicality of the usage of it.  And for 16 it appears setting the first argument as a result has cleaned things up.   Thanks for the other option as well.

Thanks.  So even though it evaluates to true it's not actually the value of true unless it's evaluated as a boolean expression.  So it wasn't really a bug in 12 just a minor technicality of the usage of it.  And for 16 it appears setting the first argument as a result has cleaned things up.   Thanks for the other option as well.

Very helpful!  Thanks!

Very helpful!  Thanks!

My Primary DNS suffix is empty so I used the IP address instead, that could be why.

Hmm ... apparently this locates my ip address to Brisbane Australia with 99% certainty.

So either I don't actually live in Canada or my internet is being routed over to Australia.  I think the latter but now the question for me is why?  Perhaps I have been hacked?

I was unaware of smartview. 

Shouldn't the default be false? **edit added** at least for single plot cases

However I specified a range so it appears smartview overrides the range.

I was unaware of smartview. 

Shouldn't the default be false? **edit added** at least for single plot cases

However I specified a range so it appears smartview overrides the range.

Yes, the view option comes in handy and has become a cure for me as well.  

I came across an issue where I have created a graph and used the range options x=#..# y=#..# then using plottools to rotate or reflect the graph I found had nullified any range specified in the original plot.  The only remedy was to explicitly tell maple the range by using the view option in the display command. 

Thanks Preben!  I was really scratching my head to find the time to velocity, much appreciated.

Thanks Preben!  I was really scratching my head to find the time to velocity, much appreciated.

Thanks!  I forgot about maple grabbing the first solution and stopping. 

First 95 96 97 98 99 100 101 Last Page 97 of 162