Hi Nilanjan,
such a solution would almost certainly not be merged into the main branch of BaseX. As Andy correctly points out, this would break the client for many users, although you might not need it.
However, for the general public and because the problem was faced quite a few times the last couple of weeks I wrote a short tutorial how to correctly submit a feature or bug report for BaseX using git. It can be found at http://docs.basex.org/wiki/Git#Developing_a_new_feature_or_bug_fix_using_git
Cheers, Dirk
On 09/29/2014 11:03 AM, Nilanjan Dutta wrote:
Yes indeed. Hence I wanted at least a 'overload'. Since i'm not dealing with a stream which would contain -in any case - such char, I implemented the entire byte to go and sit in the network stream, which is faster than traversing each element in the incoming stream.
Regards, N.D.
On Mon, Sep 29, 2014 at 2:27 PM, Andy Bunce bunce.andy@gmail.com wrote:
Hi Nilanjan, It may be faster but surely your change misses the correct handling of the bytes 00 and FF?
if (t == 0x00 || t == 0xFF) stream.WriteByte(Convert.ToByte(0xFF));
This is required for binary content and possibly some unicode documents? This may not be a problem for your use cases but it would be for others. /Andy
On 29 September 2014 09:47, Nilanjan Dutta <nilanjan.dutta.india@gmail.com
wrote:
Thanks Dirk.
GitHub is something new to me. Having a hard time raising a "pull request" as we talk. I'll get it right sometime soon may be . Meanwhile I'll continue my version of the said method and use the dll.
Regards, N.D.
On Mon, Sep 29, 2014 at 2:13 PM, Dirk Kirsten dk@basex.org wrote:
Hi Nilanjan,
BaseX is using the BSD license, which allows almost anything. You can find the surprisingly short license in license.txt. Basically you can do anything except removing the copyright notice and the list of contributors.
As for all legal advice: IANAL (I am not a lawyer). If you want to know it for sure, you will have to ask a lawyer.
Cheers, Dirk On 09/29/2014 10:26 AM, Nilanjan Dutta wrote:
How about I change this code in my local dev environment and package
it ?
Will that be legally OK? I'd do that git hub request in parallel though.
Regards, N.D.
On Mon, Sep 29, 2014 at 1:53 PM, Michael Seiferle ms@basex.org
wrote:
Hi N.D.,
feel free to send a pull request on GitHub [1,2]: https://github.com/basexdb/basex
This way we will be able to incorporate your patch into our sources.
Hope this helps and thanks for your contribution,
Michael
[1] https://help.github.com/articles/using-pull-requests [2] http://docs.basex.org/wiki/Git#Using_Git_to_contribute_to_BaseX
On 29 Sep 2014, at 10:05, Nilanjan Dutta wrote:
Hi All, > > I want to change/overload the implementation private void Send
(Stream s)
> method in the BaseXClient.cs file. [ > basex https://github.com/BaseXdb/basex / basex-api > https://github.com/BaseXdb/basex/tree/master/basex-api / src > https://github.com/BaseXdb/basex/tree/master/basex-api/src / main > https://github.com/BaseXdb/basex/tree/master/basex-api/src/main
/ c#
> <
https://github.com/BaseXdb/basex/tree/master/basex-api/src/main/c%23%3E /
> *BaseXClient.cs*] > > *Existing implementation:* > > private void Send(Stream s) { while (true) { int t = s.ReadByte();
if (t
> == > -1) break; if (t == 0x00 || t == 0xFF) stream.WriteByte(Convert. > ToByte(0xFF > )); stream.WriteByte(Convert.ToByte(t)); } stream.WriteByte(0);
info =
> Receive(); if(!Ok()) { throw new IOException(info); } } > > *What I want it to be:* > > > [image: Inline image 1] > This one is faster for my use case. Please do let me know how can
this be
> done? > > Regards, > N.D. > > [image.png] >
-- Dirk Kirsten, BaseX GmbH, http://basex.org |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22