Re: [math] "equals" in "Vector3D"

2009-04-29 Thread Wolfgang Glas
Gilles Sadowski schrieb: > Hi. > >> There is a very good article on ieee754 equality under >> >> http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm >> >> which contains an excessive discussion about various "equality" approaches. >> >> IMHO it should be moreover considere

Re: [math] "equals" in "Vector3D"

2009-04-29 Thread Wolfgang Glas
Gilles Sadowski schrieb: >>> L1 norm: equals(a, b, tolerance) = sum(abs(a-b)) < tolerance >>> L2 norm: equals(a, b, tolerance) = sqrt(sum((a-b)^2)) < tolerance >>> L-infinity norm: equals(a, b, tolerance) = max(abs(a-b)) < tolerance >>> >>> All are useful. >> I'll guess for 3D vector the L2-norm is

Re: [compress] [PATCH] Refactoring of zip encoding support.

2009-03-04 Thread Wolfgang Glas
Stefan Bodewig schrieb: > On 2009-03-04, Stefan Bodewig wrote: > >> On 2009-03-03, Wolfgang Glas wrote: > >>> The implementation should be be straightforward, shall I prepare a >>> patch or can you afford doing it at your own? > >> Will do it my

Re: [compress] [PATCH] Refactoring of zip encoding support.

2009-03-04 Thread Wolfgang Glas
Stefan Bodewig schrieb: > On 2009-03-04, Stefan Bodewig wrote: > >> On 2009-03-03, Wolfgang Glas wrote: > >>> The implementation should be be straightforward, shall I prepare a >>> patch or can you afford doing it at your own? > >> Will do it myself.

Re: [compress] [PATCH] Refactoring of zip encoding support.

2009-03-03 Thread Wolfgang Glas
Stefan Bodewig schrieb: > On 2009-03-03, Wolfgang Glas wrote: > >> Stefan Bodewig schrieb: >>> On 2009-03-02, Wolfgang Glas wrote: > >>>> Stefan Bodewig schrieb: >>>>> On 2009-03-01, Wolfgang Glas wrote: > >>>>>> 1) Unic

Re: [compress] [PATCH] Refactoring of zip encoding support.

2009-03-03 Thread Wolfgang Glas
Stefan Bodewig schrieb: > On 2009-03-02, Wolfgang Glas wrote: > >> Stefan Bodewig schrieb: >>> On 2009-03-01, Wolfgang Glas wrote: > >>>> 1) Unicode extra fields are written for all ZIP entries and not only >>>> for entries

Re: [compress] [PATCH] Refactoring of zip encoding support.

2009-03-02 Thread Wolfgang Glas
Stefan Bodewig schrieb: > On 2009-03-01, Wolfgang Glas wrote: > >> 1) Unicode extra fields are written for all ZIP entries and not only >> for entries, which are not encodable by the encoding set to >> ZipArchiveOutputStream. > > Maybe room for yet another

Re: [compress] [PATCH] Refactoring of zip encoding support.

2009-03-02 Thread Wolfgang Glas
Stefan Bodewig schrieb: > On 2009-03-02, Stefan Bodewig wrote: > >> some cosmetics and commented out the "only create Unicode field for >> non-encodable paths" part - svn revision 749342. > > and 749344 - you misspet encoding in Simple8BitEncoding.java and I > didn't see it in time. ...another

Re: [compress] [PATCH] Refactoring of zip encoding support.

2009-03-02 Thread Wolfgang Glas
Stefan Bodewig schrieb: > On 2009-03-02, Stefan Bodewig wrote: > >> some cosmetics and commented out the "only create Unicode field for >> non-encodable paths" part - svn revision 749342. > > and 749344 - you misspet encoding in Simple8BitEncoding.java and I > didn't see it in time. Yes, ThX, t

Re: [compress] State of encoding support in ZIP package

2009-03-02 Thread Wolfgang Glas
Stefan Bodewig schrieb: > On 2009-03-01, Wolfgang Glas wrote: > >> My understanding from previous discussion was, that we need a mode, >> where file names not encodable by the chosen encoding are encoded in >> UTF-8, which is in turn indicated by setting the EFS flag on t

Re: [compress] State of encoding support in ZIP package

2009-03-01 Thread Wolfgang Glas
Stefan Bodewig schrieb: > On 2009-02-27, Wolfgang Glas wrote: > >> Additionally, my experience with WinZip shows, that WinZip writes weird >> filenames to the single-byte version of the filename when a unicode field is >> present. > > Hmm, native encoding I'

[compress] [PATCH] Refactoring of zip encoding support.

2009-03-01 Thread Wolfgang Glas
Hello all, Well, the latest discussions with Stefan showed two shortcoming of our current ZIP unicode support: 1) Unicode extra fields are written for all ZIP entries and not only for entries, which are not encodable by the encoding set to ZipArchiveOutputStream. 2) In order to implement selec

Re: [compress] State of encoding support in ZIP package

2009-02-27 Thread Wolfgang Glas
Stefan Bodewig schrieb: > On 2009-02-26, Wolfgang Glas wrote: > >> Stefan Bodewig schrieb: > >>> The question on defaults: should ZipFile look for UnicodeExtraFields >>> by default or ignore them (as it does right now)? > >> I'd do this b

Re: [compress] State of encoding support in ZIP package

2009-02-26 Thread Wolfgang Glas
Hi Stefan, Thanks for your tremendous work on finishing ZIP encoding support ;-) Stefan Bodewig schrieb: > Hi all, > > a quick update and a question on defaults: [snip] > * documentation (will tackle that next) May I help you at this point ? > * ZipArchiveInputStream - SANDBOX-293 Well, Z

Re: [compress] ZIP - encoding of file names - again

2009-02-18 Thread Wolfgang Glas
Stefan Bodewig schrieb: > I started to take some baby steps implementing it, in particular > > On 2009-02-13, Stefan Bodewig wrote: > >> Currently I think the best default approach would be to use UTF-8 as >> the default encoding and set the EFS bit since this will create >> archives compatible

Re: [compress] ZIP - encoding of file names - again

2009-02-13 Thread Wolfgang Glas
Hi Stefan, My comments follow. Stefan Bodewig schrieb: > Let me try to capture the various threads in SANDBOX-176 and from this > list into something we can draw conclusions from. > > First some background: > == [snip] > Reading > === > > Let's keep ZipArchiveInputSt

Re: [compress] JarMarker

2009-02-13 Thread Wolfgang Glas
Torsten Curdt schrieb: >> Solaris contains some special code which allows people to mark jar >> files executable and run them as if they were native commands. It >> will only work for jars that contain the sequence 0xCAFE (in >> big-endian order) somewhere at the beginning, which is achieved by >>