googledrive用户界面和API的googledrive使用统计差异

2024-10-03 02:35:55 发布

您现在位置:Python中文网/ 问答频道 /正文

我们使用googledriveapi的About.Get方法返回一个Abount resource。在

在谷歌驱动器统计显示如下。在

enter image description here

但如果我们是使用谷歌驱动器的资源的反应将得到如下。在

{
"quotaBytesTotal": "16106127360",
"quotaBytesUsed": "17108627",
"quotaBytesUsedAggregate": "136771970",
"quotaBytesUsedInTrash": "0",
"quotaBytesByService": [
    {
        "serviceName": "DRIVE",
        "bytesUsed": "22255358"
    },
    {
        "serviceName": "GMAIL",
        "bytesUsed": "119663343"
    },
    {
        "serviceName": "PHOTOS",
        "bytesUsed": "0"
    }
}

驱动器API的about resource的引用链接。在


Tags: 方法namegetservice资源resourceabout驱动器
1条回答
网友
1楼 · 发布于 2024-10-03 02:35:55

http://www.whatsabyte.com/P1/byteconverter.htm

22255358=21.22兆字节

119663343=114.11986 Mb

问题在哪里?在

1Mb=2^10 kb 1kb=2^10 b(字节)

编辑: 你说得对,他们应该/可能已经使用了Mib

1000 bytes

In the International System of Units (SI) the prefix kilo- means 1000 (103); therefore one kilobyte is 1000 bytes in this system. The unit symbol is kB.

This is the definition recommended by the International Electrotechnical Commission (IEC).[1] This definition, and related definitions of prefixes mega- = 1000000, giga- = 1000000000, etc., are used for data transfer rates[2] in computer networks, internal bus, hard drive and flash media transfer speeds, and for the capacities of most storage media, particularly hard drives,[3] flash-based storage,[4] and DVDs. It is also consistent with the other uses of the SI prefixes in computing, such as CPU clock speeds or measures of performance.

The Mac OS X 10.6 file manager is a notable example of this usage in software. Since Snow Leopard, file sizes are reported with decimal prefixes.[5] 1024 bytes

In some fields of information technology, the kilobyte instead refers to 1024 (210) bytes.[6][7][8] This usage originated as compromise jargon for multiples that needed to be expressed in powers of 2, but lacked a convenient unit prefix. As 1024 (210) approximates 1000 (103), the corresponding SI prefixes were used for the multiples that represent powers of 1024.

This definition, and related definitions of mega = 1048576 (=10242), etc., are almost invariably used for random-access memory capacities, such as main memory and CPU cache sizes, due to the binary addressing of memory.[a] These "binary meanings" of kilobyte, megabyte, etc., are also used by some computer operating systems when reporting disk capacities and file sizes.[9][unreliable source?]

The binary representation of 1024 bytes typically uses the symbol KB (uppercase K). The B is often omitted in informal use. For example, a processor with 65,536 bytes of cache might be said to have "64K" of cache. kibibyte Main article: Kibibyte

In December 1998, the IEC addressed such multiple usages and definitions by creating prefixes such as kibi, mebi, gibi, etc., to unambiguously denote powers of 1024.[10] Thus the kibibyte, symbol KiB, represents 210 = 1024 bytes. These prefixes are now part of the International System of Quantities. The IEC further specified that the kilobyte should only be used to refer to 1000 bytes. However, the kilobyte is still commonly used to refer to 1024 bytes.

https://en.wikipedia.org/wiki/Kilobyte

相关问题 更多 >