You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Huffman Coding/README.markdown
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -268,7 +268,7 @@ This is what the process looks like:
268
268
269
269
Now that we know how to build the compression tree from the frequency table, we can use it to compress the contents of an `NSData` object. Here is the code:
270
270
271
-
```
271
+
```swift
272
272
funccompressData(data: NSData) -> NSData {
273
273
countByteFrequency(data)
274
274
buildTree()
@@ -296,7 +296,7 @@ Then it loops through the entire input and for each byte calls `traverseTree()`.
296
296
297
297
The interesting stuff happens in `traverseTree()`. This is a recursive method:
0 commit comments