2 coded by Ketmar // Vampire Avalon (psyc://ketmar.no-ip.org/~Ketmar)
3 Understanding is not required. Only obedience.
5 This program is free software. It comes without any warranty, to
6 the extent permitted by applicable law. You can redistribute it
7 and/or modify it under the terms of the Do What The Fuck You Want
8 To Public License, Version 2, as published by Sam Hocevar. See
9 http://sam.zoy.org/wtfpl/COPYING for more details.
19 (c := self readCharValue) ifNil: [ self error: 'unexpeced end of file' ].
20 c := c bitShift: shift.
31 c := (dw bitShift: 0 - shift) bitAnd: 255.
32 self writeCharValue: c.
37 copyFrom: fsrc size: count [
39 buf := ByteArray new: 65536.
40 [ count > 0 ] whileTrue: [
41 rd := count min: buf size.
42 rd := (fsrc read: buf size: rd).
43 rd <= 0 ifTrue: [ self error: 'file reading error' ].
44 (self write: buf size: rd) = rd ifFalse: [ self error: 'file writing error' ].
45 count := count - rd. ].