[Pkg] The Trunk: Compression-ul.49.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Aug 27 17:23:40 UTC 2016


Levente Uzonyi uploaded a new version of Compression to project The Trunk:
http://source.squeak.org/trunk/Compression-ul.49.mcz

==================== Summary ====================

Name: Compression-ul.49
Author: ul
Time: 24 August 2016, 9:23:23.899054 pm
UUID: a194073a-524e-4842-981e-cb4a433229e6
Ancestors: Compression-cmm.48

Don't let #next:putAll:startingAt: roll back the receiver when the first argument is negative.

=============== Diff against Compression-cmm.48 ===============

Item was changed:
  ----- Method: DeflateStream>>next:putAll:startingAt: (in category 'accessing') -----
  next: bytesCount putAll: aCollection startingAt: startIndex
+ 
  	| start count max |
+ 	bytesCount > 0 ifFalse: [ ^aCollection ].
  	aCollection species = collection species
  		ifFalse:
  			[startIndex to: startIndex + bytesCount - 1 do: [:i | self nextPut: (aCollection at: i)].
  			^aCollection].
  	start := startIndex.
  	count := bytesCount.
  	[count = 0] whileFalse:[
  		position = writeLimit ifTrue:[self deflateBlock].
  		max := writeLimit - position.
  		max > count ifTrue:[max := count].
  		collection replaceFrom: position+1
  			to: position+max
  			with: aCollection
  			startingAt: start.
  		start := start + max.
  		count := count - max.
  		position := position + max].
  	^aCollection!



More information about the Packages mailing list