[squeak-dev] Some proposal

Edgar J. De Cleene edgardec2001 at yahoo.com.ar
Sat Feb 20 11:59:58 UTC 2010


Skipped content of type multipart/alternative-------------- next part --------------
'From Squeak3.11alpha of 13 February 2010 [latest update: #9371] on 16 February 2010 at 11:25:09 am'!

!ReleaseBuilderFor3dot11 methodsFor: 'sources managment' stamp: 'edc 2/16/2010 11:25'!
createCompressedSources
" ReleaseBuilderFor3dot11 new createCompressedSources"

ProtoObject allSubclassesWithLevelDo:[:cl :l| | dir | 
	dir := self createDirIfnotExists:cl category.
	
	
	Cursor write showWhile: [ | zipped nameToUse unzipped buffer |
		nameToUse :=  cl printString , FileDirectory dot, ImageSegment compressedFileExtension. 
		(dir fileExists: nameToUse) ifFalse:[
			unzipped :=RWBinaryOrTextStream on: ''.
			unzipped header; timeStamp.
	 cl  fileOutOn: unzipped moveSource: false toFile: 0.
	unzipped trailer.
	
			unzipped reset.
			zipped := dir newFileNamed: (nameToUse).
	zipped binary.
	zipped := GZipWriteStream on: zipped.
	buffer := ByteArray new: 50000.
	'Compressing ', nameToUse displayProgressAt: Sensor cursorPoint
		from: 0 to: unzipped size
		during:[:bar|
			[unzipped atEnd] whileFalse:[
				bar value: unzipped position.
				zipped nextPutAll: (unzipped nextInto: buffer)].
			zipped close.
			unzipped close]]]] startingLevel: 0! !
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mendieta.jpg
Type: application/octet-stream
Size: 20053 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100220/ac2df429/mendieta.obj


More information about the Squeak-dev mailing list