[squeak-dev] The Trunk: Compression-nice.53.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Apr 26 20:52:34 UTC 2017
Nicolas Cellier uploaded a new version of Compression to project The Trunk:
http://source.squeak.org/trunk/Compression-nice.53.mcz
==================== Summary ====================
Name: Compression-nice.53
Author: nice
Time: 26 April 2017, 10:52:24.507244 pm
UUID: e6d7cbdf-497f-42b3-8b4b-f18c1f62409f
Ancestors: Compression-nice.52
Classify a few 'as yet unclassified' methods
=============== Diff against Compression-nice.52 ===============
Item was changed:
+ ----- Method: GZipSurrogateStream>>ascii (in category 'accessing') -----
- ----- Method: GZipSurrogateStream>>ascii (in category 'as yet unclassified') -----
ascii
self bufferStream ascii!
Item was changed:
+ ----- Method: GZipSurrogateStream>>binary (in category 'accessing') -----
- ----- Method: GZipSurrogateStream>>binary (in category 'as yet unclassified') -----
binary
self bufferStream binary!
Item was changed:
+ ----- Method: GZipSurrogateStream>>bufferStream (in category 'private') -----
- ----- Method: GZipSurrogateStream>>bufferStream (in category 'as yet unclassified') -----
bufferStream
^bufferStream ifNil: [bufferStream := RWBinaryOrTextStream on: (ByteArray new: 5000)].
!
Item was changed:
+ ----- Method: GZipSurrogateStream>>close (in category 'open/close') -----
- ----- Method: GZipSurrogateStream>>close (in category 'as yet unclassified') -----
close
"we don't want to until user is really done"
!
Item was changed:
+ ----- Method: GZipSurrogateStream>>closed (in category 'open/close') -----
- ----- Method: GZipSurrogateStream>>closed (in category 'as yet unclassified') -----
closed
^false!
Item was changed:
+ ----- Method: GZipSurrogateStream>>command: (in category 'writing') -----
- ----- Method: GZipSurrogateStream>>command: (in category 'as yet unclassified') -----
command: aString
"Overridden by HtmlFileStream to append commands directly without translation. 4/5/96 tk"
"We ignore any HTML commands. Do nothing"!
Item was changed:
+ ----- Method: GZipSurrogateStream>>cr (in category 'writing') -----
- ----- Method: GZipSurrogateStream>>cr (in category 'as yet unclassified') -----
cr
self bufferStream cr!
Item was changed:
+ ----- Method: GZipSurrogateStream>>fileOutClass:andObject: (in category 'writing') -----
- ----- Method: GZipSurrogateStream>>fileOutClass:andObject: (in category 'as yet unclassified') -----
fileOutClass: extraClass andObject: theObject
"Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically."
| class srefStream |
self timeStamp.
extraClass ifNotNil: [
class := extraClass. "A specific class the user wants written"
class sharedPools size > 0 ifTrue: [
class shouldFileOutPools ifTrue: [class fileOutSharedPoolsOn: self]
].
class fileOutOn: self moveSource: false toFile: 0
].
"Append the object's raw data"
srefStream := SmartRefStream on: self.
srefStream nextPut: theObject. "and all subobjects"
srefStream close. "also closes me - well it thinks it does, anyway"
!
Item was changed:
+ ----- Method: GZipSurrogateStream>>flushBuffer (in category 'private') -----
- ----- Method: GZipSurrogateStream>>flushBuffer (in category 'as yet unclassified') -----
flushBuffer
| data |
bufferStream ifNil: [^self].
data := bufferStream contents asByteArray.
gZipStream nextPutAll: data.
positionThusFar := positionThusFar + data size.
bufferStream := nil.
!
Item was changed:
+ ----- Method: GZipSurrogateStream>>header (in category 'writing') -----
- ----- Method: GZipSurrogateStream>>header (in category 'as yet unclassified') -----
header
"ignore"!
Item was changed:
+ ----- Method: GZipSurrogateStream>>newFileNamed:inDirectory: (in category 'private') -----
- ----- Method: GZipSurrogateStream>>newFileNamed:inDirectory: (in category 'as yet unclassified') -----
newFileNamed: fName inDirectory: aDirectory
positionThusFar := 0.
zippedFileStream := aDirectory newFileNamed: fName.
zippedFileStream binary; setFileTypeToObject.
"Type and Creator not to be text, so can be enclosed in an email"
gZipStream := GZipWriteStream on: zippedFileStream.
!
Item was changed:
+ ----- Method: GZipSurrogateStream>>next (in category 'reading') -----
- ----- Method: GZipSurrogateStream>>next (in category 'as yet unclassified') -----
next
^self bufferStream next!
Item was changed:
+ ----- Method: GZipSurrogateStream>>nextChunkPut: (in category 'writing') -----
- ----- Method: GZipSurrogateStream>>nextChunkPut: (in category 'as yet unclassified') -----
nextChunkPut: aString
self bufferStream nextChunkPut: aString!
Item was changed:
+ ----- Method: GZipSurrogateStream>>nextInt32Put: (in category 'writing') -----
- ----- Method: GZipSurrogateStream>>nextInt32Put: (in category 'as yet unclassified') -----
nextInt32Put: int32
^self bufferStream nextInt32Put: int32
!
Item was changed:
+ ----- Method: GZipSurrogateStream>>nextNumber:put: (in category 'writing') -----
- ----- Method: GZipSurrogateStream>>nextNumber:put: (in category 'as yet unclassified') -----
nextNumber: n put: v
^self bufferStream nextNumber: n put: v
!
Item was changed:
+ ----- Method: GZipSurrogateStream>>nextPut: (in category 'writing') -----
- ----- Method: GZipSurrogateStream>>nextPut: (in category 'as yet unclassified') -----
nextPut: aByte
^self bufferStream nextPut: aByte
!
Item was changed:
+ ----- Method: GZipSurrogateStream>>nextPutAll: (in category 'writing') -----
- ----- Method: GZipSurrogateStream>>nextPutAll: (in category 'as yet unclassified') -----
nextPutAll: aString
^aString writeOnGZIPByteStream: self
!
Item was changed:
+ ----- Method: GZipSurrogateStream>>nextPutAllBytes: (in category 'writing') -----
- ----- Method: GZipSurrogateStream>>nextPutAllBytes: (in category 'as yet unclassified') -----
nextPutAllBytes: aString
^self bufferStream nextPutAll: aString
!
Item was changed:
+ ----- Method: GZipSurrogateStream>>nextPutAllWordArray: (in category 'writing') -----
- ----- Method: GZipSurrogateStream>>nextPutAllWordArray: (in category 'as yet unclassified') -----
nextPutAllWordArray: aWordArray
| ba hackwa hackba blt rowsAtATime sourceOrigin rowsRemaining |
self flag: #bob. "do we need to be concerned by bytesPerElement??"
ba := nil.
rowsAtATime := 2000. "or 8000 bytes"
hackwa := Form new hackBits: aWordArray.
sourceOrigin := 0 at 0.
[(rowsRemaining := hackwa height - sourceOrigin y) > 0] whileTrue: [
rowsAtATime := rowsAtATime min: rowsRemaining.
(ba isNil or: [ba size ~= (rowsAtATime * 4)]) ifTrue: [
ba := ByteArray new: rowsAtATime * 4.
hackba := Form new hackBits: ba.
blt := (BitBlt toForm: hackba) sourceForm: hackwa.
].
blt
combinationRule: Form over;
sourceOrigin: sourceOrigin;
destX: 0 destY: 0 width: 4 height: rowsAtATime;
copyBits.
self bufferStream nextPutAll: ba.
self flushBuffer.
sourceOrigin := sourceOrigin x @ (sourceOrigin y + rowsAtATime).
].
!
Item was changed:
+ ----- Method: GZipSurrogateStream>>nextStringPut: (in category 'writing') -----
- ----- Method: GZipSurrogateStream>>nextStringPut: (in category 'as yet unclassified') -----
nextStringPut: s
"Append the string, s, to the receiver. Only used by DataStream. Max size of 64*256*256*256."
| length |
(length := s size) < 192
ifTrue: [self nextPut: length]
ifFalse:
[self nextPut: (length digitAt: 4)+192.
self nextPut: (length digitAt: 3).
self nextPut: (length digitAt: 2).
self nextPut: (length digitAt: 1)].
self nextPutAll: s.
^s!
Item was changed:
+ ----- Method: GZipSurrogateStream>>nextWordsPutAll: (in category 'writing') -----
- ----- Method: GZipSurrogateStream>>nextWordsPutAll: (in category 'as yet unclassified') -----
nextWordsPutAll: aCollection
"Write the argument a word-like object in big endian format on the receiver.
May be used to write other than plain word-like objects (such as ColorArray)."
^self nextPutAllWordArray: aCollection!
Item was changed:
+ ----- Method: GZipSurrogateStream>>originalContents (in category 'reading') -----
- ----- Method: GZipSurrogateStream>>originalContents (in category 'as yet unclassified') -----
originalContents
^'' "used only to determine if we are byte-structured"!
Item was changed:
+ ----- Method: GZipSurrogateStream>>padToEndWith: (in category 'writing') -----
- ----- Method: GZipSurrogateStream>>padToEndWith: (in category 'as yet unclassified') -----
padToEndWith: aChar
"We don't have pages, so we are at the end, and don't need to pad."!
Item was changed:
+ ----- Method: GZipSurrogateStream>>position (in category 'positionning') -----
- ----- Method: GZipSurrogateStream>>position (in category 'as yet unclassified') -----
position
^self bufferStream position + positionThusFar!
Item was changed:
+ ----- Method: GZipSurrogateStream>>reallyClose (in category 'open/close') -----
- ----- Method: GZipSurrogateStream>>reallyClose (in category 'as yet unclassified') -----
reallyClose
self flushBuffer.
gZipStream close.
!
Item was changed:
+ ----- Method: GZipSurrogateStream>>reopen (in category 'open/close') -----
- ----- Method: GZipSurrogateStream>>reopen (in category 'as yet unclassified') -----
reopen
"ignore"!
Item was changed:
+ ----- Method: GZipSurrogateStream>>setFileTypeToObject (in category 'properties-setting') -----
- ----- Method: GZipSurrogateStream>>setFileTypeToObject (in category 'as yet unclassified') -----
setFileTypeToObject
"ignore"!
Item was changed:
+ ----- Method: GZipSurrogateStream>>setToEnd (in category 'positionning') -----
- ----- Method: GZipSurrogateStream>>setToEnd (in category 'as yet unclassified') -----
setToEnd
"ignore"!
Item was changed:
+ ----- Method: GZipSurrogateStream>>skip: (in category 'positionning') -----
- ----- Method: GZipSurrogateStream>>skip: (in category 'as yet unclassified') -----
skip: aNumber
^self bufferStream skip: aNumber
!
Item was changed:
+ ----- Method: GZipSurrogateStream>>timeStamp (in category 'writing') -----
- ----- Method: GZipSurrogateStream>>timeStamp (in category 'as yet unclassified') -----
timeStamp
"Append the current time to the receiver as a String."
self bufferStream nextChunkPut: "double string quotes and !!s"
(String streamContents: [:s | Smalltalk timeStamp: s]) printString.
self bufferStream cr!
Item was changed:
+ ----- Method: GZipSurrogateStream>>trailer (in category 'writing') -----
- ----- Method: GZipSurrogateStream>>trailer (in category 'as yet unclassified') -----
trailer
"ignore"!
More information about the Squeak-dev
mailing list
|