<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/ByteCountFormatter/CountStyle-swift.enum",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@E@NSByteCountFormatterCountStyle"
  },
  "title" : "ByteCountFormatter.CountStyle"
}
-->

# ByteCountFormatter.CountStyle

Specifies display of file or storage byte counts. The display style is platform specific.

```
enum CountStyle
```

## Topics

### Constants

[`ByteCountFormatter.CountStyle.file`](/documentation/Foundation/ByteCountFormatter/CountStyle-swift.enum/file)

Specifies display of file byte counts. The actual behavior for this is platform-specific; in macOS 10.8, this uses the decimal style, but that may change over time.

[`ByteCountFormatter.CountStyle.memory`](/documentation/Foundation/ByteCountFormatter/CountStyle-swift.enum/memory)

Specifies display of memory byte counts. The actual behavior for this is platform-specific; in macOS 10.8, this uses the binary style, but that may change over time.

[`ByteCountFormatter.CountStyle.decimal`](/documentation/Foundation/ByteCountFormatter/CountStyle-swift.enum/decimal)

Causes 1000 bytes to be shown as 1 KB. It is better to use [`ByteCountFormatter.CountStyle.file`](/documentation/Foundation/ByteCountFormatter/CountStyle-swift.enum/file) or [`ByteCountFormatter.CountStyle.memory`](/documentation/Foundation/ByteCountFormatter/CountStyle-swift.enum/memory) in most cases.

[`ByteCountFormatter.CountStyle.binary`](/documentation/Foundation/ByteCountFormatter/CountStyle-swift.enum/binary)

Causes 1024 bytes to be shown as 1 KB. It is better to use [`ByteCountFormatter.CountStyle.file`](/documentation/Foundation/ByteCountFormatter/CountStyle-swift.enum/file) or [`ByteCountFormatter.CountStyle.memory`](/documentation/Foundation/ByteCountFormatter/CountStyle-swift.enum/memory) in most cases.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)