Re: [fpc-pascal] lnet for TCP daemon

2013-09-13 Thread wkitty42
On Thursday, September 12, 2013 7:14 AM, Michael Schnell mschn...@lumino.de wrote: On 09/12/2013 12:47 PM, Mark Morgan Lloyd wrote: I've concluded that using a thread is, in fact, preferable True. It's a pity that Synapse and friend (especially SynaSer) does does not implement

Re: [fpc-pascal] lnet for TCP daemon

2013-09-13 Thread Michael Schnell
On 09/13/2013 06:06 AM, wkitt...@windstream.net wrote: would this hamper or cause problems with normal non-gui programs using the library? 1) This feature of course should only be provided additionally to the functions we know and love. 2) Other than the work-alike

[fpc-pascal] Get empty memory quickly or... an empty file

2013-09-13 Thread Reinier Olislagers
I'm working on implementing zip64 support and trying to test things by compressing large files or streams using FPC's zip code. Currently using this to get a huge memorystream filled with the same data - so it should compress very well: ... ContentStream:=TMemoryStream.Create();

Re: [fpc-pascal] Get empty memory quickly or... an empty file

2013-09-13 Thread Ewald
Once upon a time, Reinier Olislagers said: However, I'm sure there must be quicker ways (e.g. less newbie code; using OS functions to quickly create empty memor, or alternatively create a sparse file and zip the file instead of the stream). Have you tried FillChar(), FillDWord(), ... I not,

Re: [fpc-pascal] Get empty memory quickly or... an empty file

2013-09-13 Thread Bart
On 9/13/13, Reinier Olislagers reinierolislag...@gmail.com wrote: I'm working on implementing zip64 support and trying to test things by compressing large files or streams using FPC's zip code. Currently using this to get a huge memorystream filled with the same data - so it should compress

Re: [fpc-pascal] Get empty memory quickly or... an empty file

2013-09-13 Thread Marco van de Voort
In our previous episode, Reinier Olislagers said: However, I'm sure there must be quicker ways (e.g. less newbie code; using OS functions to quickly create empty memor, or alternatively create a sparse file and zip the file instead of the stream). Do not create the data, but generate it in an

Re: [fpc-pascal] Get empty memory quickly or... an empty file

2013-09-13 Thread Reinier Olislagers
On 13/09/2013 15:19, Bart wrote: On 9/13/13, Reinier Olislagers reinierolislag...@gmail.com wrote: ContentStream.SetSize(1+$); //4 bytes+1 Actually 4 GB : 4294967295 + 1 = 4294967296 = 4 * 1024 * 1024 * 1024 Yes... but I had trouble counting Fs, so that reminder makes more sense to

Re: [fpc-pascal] Get empty memory quickly or... an empty file

2013-09-13 Thread Reinier Olislagers
On 13/09/2013 15:38, Marco van de Voort wrote: In our previous episode, Reinier Olislagers said: However, I'm sure there must be quicker ways (e.g. less newbie code; using OS functions to quickly create empty memor, or alternatively create a sparse file and zip the file instead of the stream).

Re: [fpc-pascal] Get empty memory quickly or... an empty file

2013-09-13 Thread Reinier Olislagers
On 13/09/2013 15:12, Ewald wrote: Once upon a time, Reinier Olislagers said: However, I'm sure there must be quicker ways (e.g. less newbie code; using OS functions to quickly create empty memor, or alternatively create a sparse file and zip the file instead of the stream). Have you tried

Re: [fpc-pascal] Get empty memory quickly or... an empty file

2013-09-13 Thread Michael Van Canneyt
On Fri, 13 Sep 2013, Reinier Olislagers wrote: On 13/09/2013 15:38, Marco van de Voort wrote: In our previous episode, Reinier Olislagers said: However, I'm sure there must be quicker ways (e.g. less newbie code; using OS functions to quickly create empty memor, or alternatively create a

Re: [fpc-pascal] Get empty memory quickly or... an empty file

2013-09-13 Thread Reinier Olislagers
On 13/09/2013 16:17, Michael Van Canneyt wrote: Attached a NullStream implementation. Thanks ;) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Re: returning a generic object?

2013-09-13 Thread leledumbo
Oops, sorry *must be because of my sleepiness :p -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/returning-a-generic-object-tp5716433p5716472.html Sent from the Free Pascal - General mailing list archive at Nabble.com.

Re: [fpc-pascal] lnet for TCP daemon

2013-09-13 Thread Sven Barth
Am 13.09.2013 10:47 schrieb Michael Schnell mschn...@lumino.de: On 09/13/2013 06:06 AM, wkitt...@windstream.net wrote: would this hamper or cause problems with normal non-gui programs using the library? 1) This feature of course should only be provided additionally to the functions we know